Added authentication to api