Fixed the logout/login issue