fix first-time user login bug