Integer userId = userIdString == null ? null : Integer.valueOf(userIdString);
if (userId == null || userId != subject.getId()) {
SubjectManagerLocal subjectManager = LookupUtil.getSubjectManager();
Subject authSubject = subjectManager.checkAuthentication(userName, userPassword);
if (authSubject == null) {
PropertySimple userNameProp = new PropertySimple(PROP_USER_NAME, userName);
userNameProp.setErrorMessage(VALIDATION_ERROR_MESSAGE);
alertParameters.put(userNameProp);