title: Handling RestKit Authentication Challenge
body: <p>I'm building an iPhone App leveraging RestKit to pull/push data to a remote API. This API requires a username/password authentication. I'm wondering how to handle a bad username or password if the user were to input one that didn't work. All I've been able to find is the generic RestKit error handler which doesn't do me a whole lot of good:</p>
  
  <pre><code>- (void)objectLoader:(RKObjectLoader*)objectLoader didFailWithError:(NSError*)error
  </code></pre>
  
  <p>With an incorrect username or password, this will give me:</p>
  
  <pre><code>MyApp iPhone[4758:fb03] W restkit.network:RKResponse.m:157 Failed authentication challenge after 1 failures
  MyApp iPhone[4758:fb03] E app:iPhoneSignIn.m:720 Hit error: Error Domain=NSURLErrorDomain Code=-1012 "The operation couldn’t be completed. (NSURLErrorDomain error -1012.)" UserInfo=0xd964b80 {NSErrorFailingURLKey=https://my.example.com/api/v1.0/?format=json, NSErrorFailingURLStringKey=https://my.example.com/api/v1.0/?format=json}
  </code></pre>
  
  <p>I was wondering if there was a better way to handle an improper username or password response?</p>