update sessions_helper.rb as Listing 8.19.