Inspect response code on authenticate for correct handling of authentication failures and unexpected status code returns.