code: private void setToken(String userToken, UserDetail userDetail, boolean loginPending) {
  		boolean changed = !isEqual(this.userToken, userToken);
  		this.userToken = userToken;
  		if (null == userDetail) {
  			userDetail = new UserDetail();
  		}
  		this.userDetail = userDetail;
  		if (changed) {
  			TokenChangedEvent event = new TokenChangedEvent(userToken, userDetail, loginPending);
  			manager.fireEvent(event);
  		}
  	}
docs: Set the user token, so it can be sent in every command. This is the internal version, used by the token changed
  handler.
  
  @param userToken
  user token
  @param userDetail
  user details
  @param loginPending
  true if this will be followed by a fresh token change