Added authentication to the api.