tomcat.addContext("", System.getProperty("java.io.tmpdir"));
LoginConfig config = new LoginConfig();
config.setAuthMethod("BASIC");
ctx.setLoginConfig(config);
ctx.getPipeline().addValve(new BasicAuthenticator());
Tomcat.addServlet(ctx, "servlet", new LoginLogoutServlet());
ctx.addServletMapping("/", "servlet");
TesterMapRealm realm = new TesterMapRealm();