Passing xhr response object to success and failure callbacks