code: public void authenticateAndSignin(String username, String password) {
  		logger.debug("authenticateAndSignin:" + username);
  
  		Authentication request = new UsernamePasswordAuthenticationToken(username, password);
  		Authentication result = authenticationManager.authenticate(request);
  		SecurityContextHolder.getContext().setAuthentication(result);
  	}
docs: WARNING: Normally this is used by non-web interface. For web interface,
  pls use Spring Security config to auto authenticate
  
  @param username
  @param password