code: public UserDetails loadUserByUsername(String ident) {
  		User user = new User();
  		// check if the cookie has an appid prefix
  		// and load user from the corresponding app
  		if (StringUtils.contains(ident, "/")) {
  			String[] parts = ident.split("/");
  			user.setAppid(parts[0]);
  			ident = parts[1];
  		}
  		user.setIdentifier(ident);
  		user = loadUser(user);
  
  		if (user == null) {
  			throw new UsernameNotFoundException(ident);
  		}
  
  		return new AuthenticatedUserDetails(user);
  	}
docs: Loads a user from the data store.
  @param ident the user identifier
  @return a user object or null if user is not found