private boolean isLoggedIn(HttpServletRequest request, HttpServletResponse response) {
final String login = request.getParameter(LOGIN_PARAM);
final String password = request.getParameter(PASSWORD_PARAM);
String userId = null;
if (login != null && password != null) {
userId = LoginUtils.getValidUserId(new DalConnectionProvider(), login, password);
} else { // use basic authentication
userId = doBasicAuthentication(request);
}
if (userId != null) {
OBContext.setOBContext(UserContextCache.getInstance().getCreateOBContext(userId));