Add onidentityresult event handler