handleLogout