added pubnub client and functions and loging users