fix the login lock bug