Fixed #169 - Server crash

I think the check for `token` here is not necessary, since you've already used it in line 33 to get the `username`, and presumably if it didn't exist, you'd get back no username.