Create chat.js

Javascript client side