adds generateToken method to Session object, fixes #21