Check for correct logged in user in referenceCode.