cmd: properly handle authentication errors in login

When login fail, we also return 401, but in this case we don't wanna
show the default unauthorized message.

Fix #964.