Enable override of api endpoint

When the end user has signed in via oauth, the datacenter is not in the API key. So, the endpoint should be be supplied separately (as a parameter to the initializer).