if (login != null && password != null) {
// Validating login and password
User user = main.dataConnector.getUser(login);
if (user != null && user.password.equals(password)) {
// Login complete
Session session = main.sessionManager.createSession(login);
responseHeaders(ResponseFormat.JSON, 200);
//response.setCookie(session.asCookie(COOKIE_SESSION_ID));
sendJson(session);
} else {