title: Rails - devise and sidekiq routes
body: <p>I am running a Rails 5.0.0 app with Ruby 2.3.1</p>
  
  <p>Sidekiq is being used for background jobs and devise for authentication.</p>
  
  <p>Sidekiq monitoring and devise are mounted in routes as follows:</p>
  
  <pre><code>devise_for :users, skip: [:sessions]
      as :user do
          get    'login' =&gt; 'devise/sessions#new',      :as =&gt; :new_user_session
          post   'login' =&gt; 'devise/sessions#create',   :as =&gt; :user_session
          delete 'logout' =&gt; 'devise/sessions#destroy', :as =&gt; :destroy_user_session
      end
  
  require 'sidekiq/web'
      require 'sidekiq/cron/web'
      #Sidekiq::Web.set :session_secret, Rails.application.secrets[:secret_key_base]
      authenticate :user do
          mount Sidekiq::Web =&gt; '/sidekiq'
      end
  </code></pre>
  
  <p>But, accessing the sidekiq status page logs out the user.</p>
  
  <p>The same code used to work fine with Rails 4.2.5</p>