Authentication based on railscast 250