Experimente a função de logout assim ... function logout() { session_start(); $_SESSION = array(); session_destroy(); }