Refactored login controller replacing the magic numbers
Created the filter logic on Rails for the all users can not access the system without login first, except the get '/login', post '/login' and get '/'