connect to the sever when chatbox show