What is the role of the controllers? (Advanced question)

Note also that if you define a login method in application.rb, it is accessible to any controller in your app. Again, store_location, or any similar means or remembering the intended destination will work fine to move the user along to the right page after they log in.