call pubnub after page loaded