Fix the re-login bug