refactor ip-apps code;
improve AuthTokenManager;
improve return size handling based on Xianrui's suggestion.