Added basic auth functionality to web api.