Simple chat application using js