Almost the same as http://railscasts.com/episodes/250-authentication-from-scratch, with a small change for Rails 4 strong parameters