Fix bug freezing when wrong password is entered.