title: Users immediately logged out by devise, only on production
body: <p>I'm working on a rails web app (not originally written by me). Devise is used for authentication. It works fine in the development environment. In production however, users can log in successfully, but on subsequent GET requests, they are no longer logged in and current_user is nil.</p>
  
  <p>I'm not even sure how to debug this because it seems like all of the devise functionality is behind the scenes. Any suggestions as to what could cause this and what I can check?</p>