title: After a successful DEVISE login, how to redirect user back to previous action that required login?
body: <p>I have an ajax voting button: If a user clicks on a "thumbs up" image, but is not logged in, then they should see a dialog box that asks them to login first.</p>
  
  <p>To do this dialog box,I'm using jQuery and facebox bound to ajax:failure event.  Devise will raise a 401 Unauthorized if the user is not logged in.  facebox loads the remote html for the login in a pop-up dialog box that presents the DEVISE signin form.</p>
  
  <p>Everything works except after successful login, user is redirected to the homepage.  It would be more intuitive if user was redirected back to the post they were looking at so they can continue their vote.  </p>
  
  <p>Is there a best practices way of achieving this behavior?  </p>
  
  <p>Thanks.</p>