restructured PortalTokenSecurityHandler to match AGOLTokenSecurityHandler