Tcp chat app with node js and event emitters