Authenticating with the api