```ruby
Rails.application.routes.draw do

  devise_for :users
  get 'login/index'
  root 'login#index'

  resources :costs
  resources :incomes
  resources :categories
  resources :transactions
end
```

Change root based on whether or not the user is signed in
user
```ruby
Rails.application.routes.draw do
  devise_for :users
  get 'login/index'
  resources :transactions

  authenticated :user do
    root 'transactions#index', as: "authenticated_root"
  end

  root 'login#index'
  resources :costs
  resources :incomes
  resources :categories
end
```
assistant