rb = Response.ok(generateHTMLResult(admin));
if (admin.isAuthorized()) {
int maxAge = 60 * ConfigManager.getServerConfig()
.getAdminCookieMaxageMinutes();
NewCookie cookieUsername = new NewCookie("username", admin
.getUsername(), null, null, null, maxAge, false);
NewCookie cookiePassword = new NewCookie("password", admin
.getPassword(), null, null, null, maxAge, false);
rb.cookie(cookieUsername, cookiePassword);
}
}