Fixed #169 - Server crash

I think it would be more clear to break this up into a few pieces:

```js
var token = websocketAuth.generateTokenForClient(username);
res.json(200, token);
```