UP: Added TokenError and tests