added reconnection in 2 seconds on js side
added reconnection in 2 seconds on js side
added some docs and comments
docs and comments to chat handlers