Login error message

Continuation of #889.