fix the login bug(the currentUser is not null after logout).