fixed the logout bug