Use this method to create a sessionToken:
client.generateSession();
You have to set up the session after you generate it.
The following example will generate a session and set it up:
client.generateSession().then(function (response) {
var sessionToken = response.sessionToken;
});