Propagate a base URI that is based upon the uri from the request

So if a user makes a request to `http://my.hostname/...` instead of `http://localhost:8900`, all the URIs returned by the auth API use `http://my.hostname/...`

That base URI should also get propagated to all the plugins, so they can generate correct URIs if necessary.
`for` loops in tests are always a warning sign for me.  They can be okay if they're iterating over a list of expected values, but the expected values here are actually computed from the system under test.  Although you're asserting about the length of `services`, you're `not` asserting about the length of `services[0]['endpoints']`, so this'll pass if there's a bug which produces an empty endpoint list.