title: uninitialized constant SessionsController ROR rails 4
body: <p>Hi I am beginner to Ruby on rails. I am trying to some experiments. I am trying to implement user login. I am not using any gem. I tried that in following way :</p>
  
  <pre><code>get "log_out" =&gt; "sessions#destroy", :as =&gt; "log_out"
    get "log_in" =&gt; "sessions#new", :as =&gt; "log_in"
    get "sign_up" =&gt; "users#new", :as =&gt; "sign_up"
    root :to =&gt; "users#new"
    resources :users
    resources :sessions
  
  class SessionController &lt; ApplicationController
    def new
    end
  
     def create
      user = User.authenticate(params[:email], params[:password])
      if user
        session[:user_id] = user.id
        redirect_to root_url, :notice =&gt; "Logged in!"
      else
        flash.now.alert = "Invalid email or password"
        render "new"
      end
    end
  
     def destroy
      session[:user_id] = nil
      redirect_to root_url, :notice =&gt; "Logged out!"
    end
  
  end
  </code></pre>
  
  <p>when I tried to hit <code>http://localhost:3000/log_in</code> It showed </p>
  
  <pre><code>uninitialized constant SessionsController
  routing error
  </code></pre>
  
  <p>Am I doing anything wrong? Need some Help. Thank you.</p>