Example fix

Fixed the API in the example to correctly check `hasScope()` and other token/session information.