get appId and permissions in init method, remove singleton