Fixed logout/login bug
Fixed logout/login bug

--- a/Resources/info.php
+++ b/Resources/info.php
@@ -34,6 +34,22 @@
 
 // Load the framework
 require_once 'lib/Framework/main.php';
+
+
+if (isset($_COOKIE['PHPCredLockerKeySet']) && BTMain::getVar('destSession') == 'Y'){
+
+$expires = strtotime("-2 days");
+setcookie("PHPCredLockerKeySet", 1, $expires, dirname($_SERVER["REQUEST_URI"]), $_SERVER['HTTP_HOST'], BTMain::getConf()->forceSSL);
+BTMain::unsetSessVar('tls');
+BTMain::unsetSessVar('KeyExpiry');
+BTMain::unsetSessVar('apiterms');
+
+$_COOKIE['PHPCredLockerKeySet'] = 0;
+
+}
+
+
+
 
 $tls = BTMain::getSessVar('tls');
 $expiry = BTMain::getSessVar('KeyExpiry');

--- a/lib/output.php
+++ b/lib/output.php
@@ -223,7 +223,7 @@
     <?php endforeach;?>
 
 
-      <script id='kFile' src="Resources/info.php?<?php echo md5(session_id().$_SERVER['REMOTE_ADDR']); ?>" type="text/javascript"></script>
+      <script id='kFile' src="Resources/info.php?<?php $frs = BTMain::getSessVar('cacheFrustrate'); echo md5(session_id().$_SERVER['REMOTE_ADDR']).$frs; ?><?php $notif=BTMain::getVar('notif'); if (!empty($notif) && ($notif == 'LoginFailed' || $notif == 'LoggedOut' || $notif == 'InvalidSession')){ echo "&destSession=Y"; BTMain::setSessVar('cacheFrustrate',mt_rand());}?>" type="text/javascript"></script>
 
 
       <?php