Adds messages element to index.html