anchor.diff:  %>
    <p>You are now redirected to <%=Util.getIdentityProviderSSOServiceURL()%>. If the
    redirection fails, please click the post button.</p>
  -<form method="post" action="<%=Util.getIdentityProviderSSOServiceURL()%>">
  +<form method="post" action="<%=url%>">
       <p><input type="hidden" name="<%=SAML2SSOAuthenticatorConstants.HTTP_POST_PARAM_SAML2_AUTH_REQ%>"
                 value="<%= encodedReq %>"/>
           <input type="hidden" name="RelayState" value="<%= relayState %>"/>
  
positive.code:     String encodedReq = null;
      String relayState = "";
      String domain = null;
      if (request.getParameter(SAML2SSOAuthenticatorConstants.LOG_OUT_REQ) != null) {
          LogoutRequestBuilder logoutRequestBuilder = new LogoutRequestBuilder();
          LogoutRequest logoutReq = logoutRequestBuilder.buildLogoutRequest((String) request.getAttribute(
  
negative.code:          encodedReq = Util.encode(Util.marshall(authRequest));
           relayState = UUIDGenerator.generateUUID();
           domain = (String)request.getAttribute(MultitenantConstants.TENANT_DOMAIN);
           url = Util.getIdentityProviderSSOServiceURL();
      }
      // add the relay state to Session Manager
      SSOSessionManager.addAuthnRequest(relayState);
  