code: public Person checkLogin(final String _name,
                               final String _passwd)
      {
          Person person = null;
          try {
              final LoginCallbackHandler callback = new LoginCallbackHandler(ActionCallback.Mode.LOGIN, _name, _passwd);
              final LoginContext login = new LoginContext(getApplicationName(), callback);
              login.login();
  
              person = getPerson(login);
  
              if (person == null) {
                  person = createPerson(login);
              }
  
              if (person != null) {
                  updatePerson(login, person);
  
                  person.cleanUp();
  
                  updateRoles(login, person);
                  updateGroups(login, person);
                  updateCompanies(login, person);
  
                  person.updateLastLogin();
              }
          } catch (final EFapsException e) {
              LoginHandler.LOG.error("login failed for '" + _name + "'", e);
          } catch (final LoginException e) {
              LoginHandler.LOG.error("login failed for '" + _name + "'", e);
          }
          return person;
      }
docs: The instance method checks if for the given user the password is
  correct. The test itself is done with the JAAS module from Java.<br/> If
  a person is found and successfully logged in, the last login information
  from the person is updated to current time stamp.
  
  @param _name     name of the person name to check
  @param _passwd   password of the person to check
  @return found person
  @see #getPerson(LoginContext)
  @see #createPerson(LoginContext)
  @see #updatePerson(LoginContext, Person)
  @see #updateRoles(LoginContext, Person)
  @see #updateGroups(LoginContext, Person)