fixed the logout problem