title: Rails: Proper Sign In structure?
body: <p>I have a "Sign-In" function - :controller => "sessions" , :action => "new" </p>
  
  <p>I've also edited :controller => "application" so that if I'm anywhere on the website, and I'm not logged in - I'm redirected to the root path:</p>
  
  <pre><code>before_filter :login_required
  protected
    def login_required
      redirect_to "/" if not session[:user]
  end
  </code></pre>
  
  <p>But the problem is that now I can not get to the sign in page.</p>
  
  <p>It used to be localhost:3000/sessions/new</p>
  
  <p>I thought that changing root path would help, so I added this to the routes.rb:</p>
  
  <pre><code>match '/', :controller =&gt; 'sessions', :action =&gt; 'new'
  </code></pre>
  
  <p>And after that localhost:3000 started giving the error "Wrong Forwarding" in browser.</p>
  
  <p>I also don't want to have "/sessions/new/" as my default location.</p>
  
  <p>Is there a way, when I go to "/" - to see the content of "/sessions/new/" and still keep my protection code in application controller?</p>