added some socket functionalities to chat.jade