get '/login' => sub { # Display a login page; the original URL they requested is available as # param('requested_path'), so could be put in a hidden field in the form # debug "displaying login page"; template 'login', { path => param('requested_path') }; };