title: How to remove html redirection in devise authenticate_user
body: <p>I use the devise's authenticate_user! method in a controller. This is working fine when the auth_token provided in the request is the correct one but if the authentication fails, I end up with:</p>
  
  <pre><code>curl -XGET 'http://localhost:3000/my_obj?auth_token=wrongtoken'
  
  &lt;html&gt;&lt;body&gt;You are being &lt;a href="http://localhost:3000/users/sign_in"&gt;redirected&lt;/a&gt;.&lt;/body&gt;&lt;/html&gt;
  </code></pre>
  
  <p>As I use rabl, what is the best way to have something like</p>
  
  <pre><code>{'error' : 'authentication error'}
  </code></pre>
  
  <p>returned intead of the html redirection ?</p>