GPII-609: Return token(s) as JSON

var token = tokens.join(",") returns the list of tokens as comma-separated strings, while the message that no token is logged in is returned as JSON. 

One option is var token = JSON.stringify(tokens)

Another option is what I wrote ;-)

Some comments: 
* When I try to log in a token that requires software that is not installed locally (e.g. ReadWrite Gold), the system reports that no token is logged in. This seems strange. 
* When I fist log in sammy and then elaine (using URLs in the browser, and the software required for both is available locally), the system returns both tokens. I assume that is OK. 
* When I test this in a browser, the list of tokens is returned with the MIME type text/html, whereas the error message is returned as application/json.
GPII-609: Return token(s) as JSON

That'll teach me to make commits directly through GitHub (the line 'var token = "", len = 0;' was missing from my previous attempt).

This new commit follows a suggestion from Antranig and is much simpler. The list of tokens is now returned as JSON (and with MIME type application/json).
GPII-290: Return token(s) as JSON

Two small changes to make the tests run with my changes to GetToken.js.
GPII-290: Return token(s) as JSON

Minor edit because of a message that needs to match something in GetTokenTests.js
Merge pull request #227 from cstrobbe/patch-5

GPII-290: Reviewed and testing - so merging ... Cheers Christophe