Node.js port of https://github.com/wtsi-hgi/hgi-web_apitoken

...The "meat" of it, at least