Optimization so logout() doesn't get called twice for now-invalid passwords.