Fix widget SSO
Refactor Token class