Changed code to let the chat run through a nodejs server.