fix issues in allowing different UserIdentity