Fix login bug with an invalid password