moved resources :companies to end of routes.rb file
solved authenticate issue for functional tests