anchor.diff:  <%@ page import="com.ecyrd.jspwiki.attachment.*" %>
   <%@ page import="java.util.*" %>
   <%@ page import="com.ecyrd.jspwiki.tags.WikiTagBase" %>
  +<%@ page import="com.ecyrd.jspwiki.auth.*" %>
   <%@ page errorPage="/Error.jsp" %>
   <%@ taglib uri="/WEB-INF/jspwiki.tld" prefix="wiki" %>
   
  
positive.code: </head>
  
  <body class="login" bgcolor="#FFFFFF">
    <BR>
    <BR>
    <FORM action="<wiki:Variable var="baseURL"/>Auth.jsp" ACCEPT-CHARSET="ISO-8859-1,UTF-8">
    <INPUT type="hidden" name="page" value="<%=pagereq%>">
    <DIV align="center">
      <TABLE BORDER="0" CELLSPACING="3" CELLPADDING="5" width="35%" BGCOLOR="#efefef"\>
        <TR>
          <TD colspan="2" bgcolor="#bfbfff">
            <DIV align="center">
              <H3>Welcome to <wiki:Variable var="applicationname"/></H3>
            </DIV>
          </TD>
        </TR>
        <TR>
          <TD>Login:</TD>
          <TD><input type="text" name="uid"></TD>
        </TR>
        <TR>
          <TD>Password:</TD>
          <TD><input type="password" name="passwd"></TD>
        </TR>
        <TR>
          <TD colspan="2">
            <DIV align="center">
              <input type="submit" name="action" value="login">
            </DIV>
          </TD>
        </TR>
      </TABLE>
    </DIV>
  </body>
  
  </html>
  
negative.code: %>
  
  <%
      WikiContext wikiContext = wiki.createContext( request, WikiContext.LOGIN );
      String pagereq = wikiContext.getPage().getName();
  
      NDC.push( wiki.getApplicationName() + ":Login.jsp"  );
  
      pageContext.setAttribute( WikiTagBase.ATTR_CONTEXT,
                                wikiContext,
                                PageContext.REQUEST_SCOPE );
  
      String action = request.getParameter("action");
      String uid    = request.getParameter("uid");
      String passwd = request.getParameter("passwd");
  
      UserManager mgr = wiki.getUserManager();    
  
      if( "login".equals(action) )
      {
          if( mgr.login( uid, passwd, session ) )
          {
              response.sendRedirect( wiki.getViewURL(pagereq) );
              return;
          }
      }
      else if( "logout".equals(action) )
      {
          mgr.logout( session );
          response.sendRedirect( wiki.getViewURL(pagereq) );
          return;
      }
  
      response.setContentType("text/html; charset="+wiki.getContentEncoding() );
  %>
  