resolve error messages correctly if login fails