<?php
require_once "magic/session_config.php";
bdr_start_session();
unset($_SESSION["user_id"]);
unset($_SESSION["realName"]);
unset($_SESSION["branch"]);
session_destroy(); 
$secure = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off');
foreach (array('/', '/auth', '/actions') as $cookiePath) {
    setcookie(session_name(), '', time() - 3600, $cookiePath, '', $secure, true);
}
header("location:index.php");
?>
