Authenticating with the web API