Fixed #169 - Server crash

Don't pass the index into this, calculate it in here.  Just pass the username.  Also, it should be safe to call this and things not crash if the username or token are missing.