fixes to node client using improper 'this' and not passing all necessary arguments

I found and resolved these issues while building a Node script to parse our keen.io data