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

This may not answer your bigger question, but to the specific example,
you could stash the referrer url in the session, go to the
registration and login, and then redirect back to the saved location
rather than the home page. In restful_authentication plugin this is
what the store_location and redirect_back_or_default method do. Then
your controller actions stay separate.