if (authMethod == BuiltInAuthMethod.BASIC) {
authenticator = new BasicAuthenticator();
} else if (authMethod == BuiltInAuthMethod.DIGEST) {
authenticator = new DigestAuthenticator();
} else if (authMethod == BuiltInAuthMethod.CLIENTCERT) {
authenticator = new ClientCertAuthenticator();
} else if (authMethod == BuiltInAuthMethod.FORM) {
boolean dispatch = true;
// authenticator = new FormAuthenticator(loginPage, errorPage, dispatch);
authenticator = new FormAuthenticator(loginPage, errorPage, true);
} else if (authMethod == BuiltInAuthMethod.NONE) {