Adding a socket server.
Adding chat template
Finalizing chat