Login v2 API

Introducing the v2 Login API, backed by the original Admin.Login logic. Builds on proposed pull request #367.
I'm pretty sure you've broken things by removing all this.

The idea is if an error is returned from doCheckCreds while an upgrade or restore is in progress (as checked by this method) then the error that should have been returned should be replaced by a "maintenance in progress" error. This is needed because various transitory login failures are possible before DB migrations have run or while data is being restored.

What you've done removes this behaviour. Please put it back!