title: Devise and current_user issue when using namespace
body: <p>On core website I use standard Devise configuration for user authentication. In routes.rb:</p>
  
  <pre><code>devise_for :users
  </code></pre>
  
  <p>Now, I have a namespace, lets call it "frame", being used for display some views via some controllers in small window (or iframe) on remote page.
  I need to authenticate user inside the frame, therefore I nested devise_for declaration:</p>
  
  <pre><code>namespace :frame do
    devise_for :users
    resources :albums, :only =&gt; :show do
      resources :photos, :only =&gt; [:new, :create, :show]
    end
  end
  </code></pre>
  
  <p>To make the whole thing work I needed to create proper controller:</p>
  
  <pre><code>class Frame::SessionsController &lt; ::Devise::SessionsController
    layout "frame"
  end
  </code></pre>
  
  <p>And now I use the following path to display form:</p>
  
  <pre><code>new_frame_user_session_path
  </code></pre>
  
  <p>HOWEVER. When I logged in via frame, *current_user* is nil, and I have *current_frame_user* instead. It's bad, because the user logged in via core website (*current_user*) should be available via frame and reverse (in one browser).</p>
  
  <p>Is there a little tweak to achive it or I should change the whole approach? Thank You for help.</p>