Replaced hard-coded path to chat.html with dynamic, so that script works on any server