Added ability to supply basic auth credentials when accessing API.