fix #4467: login failure reports unknown error
Merge branch 'issue-4467' into upstream