code: def post_login(self, came_from=lurl('/')):
          
          if not request.identity:
              login_counter = request.environ.get('repoze.who.logins', 0) + 1
              redirect('/login',
                  params=dict(came_from=came_from, __logins=login_counter))
          userid = request.identity['repoze.who.userid']
          flash(_('Welcome back, %s!') % userid)
          redirect(came_from)
docs: Redirect the user to the initially requested page on successful
          authentication or redirect her back to the login page if login failed.