Adding some logic to handle config problems, specifically HTTP 401s.