Devise is a full-featured authentication solution which handles all of the controller logic and form views for you. Learn how to set it up in this episode.

Read more at the source