} 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) {
authenticator = new NoneAuthenticator();
} else {
throw new IllegalStateException("someone added a new BuiltInAuthMethod without telling us");
}
return authenticator;
}