Added auth to the api endpoints