Making chat.js a template instead of adding session.js as importing global variables doesn't seem to work in this instance