New communication to server with better NodeJS api
Incorporates contribution from andyedinborough.
This version keeps repeated usage of name/password from the logs and uses cookies to maintain auth rather than always passing in name/password. Also handles encoding of parameters better.