Merge session queries into identity queries