updating the index.html to handle messages