fixed the logout issue