APIClient: recognize 401 responses as error