connect socket when client is initialized