Server side Chat API (still needs serverside cookies!)

Cookies are needed, at the moment, I have bypassed that requirement
using a hashmap of tokens and usernames.