updates to IdentityPlugin code