how named routes work ?

I've been analysing a rails project where it has routes.rb like

routes.rb :

  map.connect '/sessions/remote_create', :controller => '/sessions', :action => 'remote_create'   map.resources :users, :sessions, :unfiled_documents, :appointments, :searches, :pat_ratio   map.login '/login', :controller => '/sessions', :action => 'new'   map.logout '/logout', :controller => '/sessions', :action => 'destroy'   map.home '/', :controller => '/sessions', :action => 'index'

What I dont understand is whenever I open the app in my browser it automatically goes to "/session/new" -- as default page

Can anybody explain how it is working ? I've heard we need to use map.root for default page.

From the information you have provided, there may be an authentication call to see if you are legged in. In not it sends you to the login page automatically. Perhaps look in the application controller to see if there is an authentication filter.

Cheers, John Ivanoff