fix the logout bug