better error reporting on failed login