Drive-by: log when jujud terminates due to specific login errors
apiserver: changed login failure handling during upgrades and restores

Login attempts may fail during upgrades or restores due to data
manipulations performed (or not performed yet) by these
operations. Instead of reporting a "bad credentials" error in this
case, which is confusing to users and causes unit agents to terminate,
return "maintenance in progress" instead.

Fixes LP #1372752.
Merge pull request #853 from mjs/1372752-api-login-fails-during-upgrade

apiserver: changed login failure handling during upgrades

Login attempts may fail during upgrades due to schema migrations not having been applied yet. Instead of reporting a "bad credentials" error in this case, which is confusing to users and causes unit agents to terminate, return "upgrade in progress" instead.

Fixes LP #1372752.

http://reviews.vapour.ws/r/119/diff/