anchor.diff:          </div>
       </div>
       <% } %>
  -    <%!
  -        private String getRecoverAccountUrl(String identityMgtEndpointContext, String urlEncodedURL, boolean isUsernameRecovery) {
  -
  -            return identityMgtEndpointContext + "/recoveraccountrouter.do?callback=" +
  -                    Encode.forHtmlAttribute(urlEncodedURL) + "&isUsernameRecovery=" + isUsernameRecovery;
  -        }
  -
  -        private String getRegistrationUrl(String identityMgtEndpointContext, String urlEncodedURL) {
  -
  -            return identityMgtEndpointContext + "/register.do?callback=" + Encode.forHtmlAttribute(urlEncodedURL);
  -        }
  -    %>
  +   <%!
  +           private String getRecoverAccountUrl (
  +               String identityMgtEndpointContext,
  +               String urlEncodedURL,
  +               boolean isUsernameRecovery,
  +               String urlParameters) {
  +
  +               return identityMgtEndpointContext + "/recoveraccountrouter.do?" + urlParameters +
  +                   "&isUsernameRecovery=" + isUsernameRecovery + "&callback=" + Encode.forHtmlAttribute(urlEncodedURL);
  +           }
  +
  +           private String getRegistrationUrl (
  +               String identityMgtEndpointContext,
  +               String urlEncodedURL,
  +               String urlParameters) {
  +
  +               return identityMgtEndpointContext + "/register.do?" + urlParameters +
  +                   "&callback=" + Encode.forHtmlAttribute(urlEncodedURL);
  +           }
  +       %>
   </form>
  
positive.code:                     console.warn("Prevented a possible double submit event");
                  } else {
                      e.preventDefault();
                      var userName = document.getElementById("username");
                      userName.value = userName.value.trim();
                      if(userName.value){
                          $.ajax({
                              type: "GET",
                              url: "/logincontext?sessionDataKey=" + getParameterByName("sessionDataKey") + "&relyingParty=" + getParameterByName("relyingParty") + "&tenantDomain=" + getParameterByName("tenantDomain"),
                              success: function (data) {
                                  if (data && data.status == 'redirect' && data.redirectUrl && data.redirectUrl.length > 0) {
                                      window.location.href = data.redirectUrl;
  
negative.code:             String serverName = request.getServerName();
              int serverPort = request.getServerPort();
              String uri = (String) request.getAttribute(JAVAX_SERVLET_FORWARD_REQUEST_URI);
              String prmstr = URLDecoder.decode(((String) request.getAttribute(JAVAX_SERVLET_FORWARD_QUERY_STRING)), UTF_8);
              String urlWithoutEncoding = scheme + "://" +serverName + ":" + serverPort + uri + "?" + prmstr;
              urlEncodedURL = URLEncoder.encode(urlWithoutEncoding, UTF_8);
              identityMgtEndpointContext =
  