anchor.diff:    if Request.Params.Values['submit'] = 'Logout' then
     begin
       Request.Session.Free;
  -    Response.Redirect('login');
  +    Response.Redirect(Request.Document);
       Exit;
     end;
   
  
positive.code:     + '    <title>Form based login example</title>' + #13
      + '  </head>' + #13
      + '  <body>' + #13
      + '    <form method="post" action="login">' + #13
      + '     <input type="text" name="username" required>' +#13
      + '     <input type="password" name="password" required>' + #13
      + '     <input type="submit" name="submit" value="Login">' + #13
  
negative.code: 
    if CheckPwd(Username, Password) then
    begin
      // store username in session
      Request.Session.Content.Values['form:username'] := Username;
      // success: redirect to home page
      Response.Redirect(Request.Document);
    end else begin
      // bad user/password: return authentication error
      Response.ResponseNo := 401;
  