LoginManager loginManager = SessionUtil.getInstance().getLoginManager();
if (loginManager.isLoginValid(login, password, clientIP)) {
loginManager.initiateSession(request, login);
response.sendRedirect("chooseContest");
} else {
loginManager.finalizeSession(request);
response.setContentType("text/html");
response.getOutputStream().println("<script language=\"javascript\">"
+ "alert(\"Login Failed\");"
+ "history.go(-1);"
+ "</script>");