Integrating web sockets to build chat