added authentication method to api