copied frontend from chat-nodejs