Rework auth config loading and use of auth data for login/pull/push

These changes make auth actually work for pull/push operations (relying on the returned message isn't reliable, but the HTTP status code is, see `postAuth()` in `api.go` in Docker). Also cleaned up auth management, auth config loading, and cleaned up the way the returned structure is used in the `login`, `pull` and `push` operations that require auth.