$(...) performs command substition, i.e. it runs whatever is in the parentheses as a command. Thus:
while line=$(line) # /userimport/userimport
executes a command called "line" (which is fine, /usr/bin/line reads one line from stdin and writes it to stdout) and
while insideline=$(insideline) # /userimport/acctcompare
executes a command called "insideline", which doesn't exist.
Change the latter to
while insideline=$(line) # /userimport/acctcompare
and it should be OK, though if you want to find unique lines in the file, then
sort /userimport/userimport | uniq
might be easier. Or maybe I missed something.