[AP-1756] Handle error from failed login sensibly