Why does user_load($id) NOT return FALSE when an invalid id is passed in?
The account test probably is working, but this is wrong:

return "&lt;H3&gt;Invalid acctid "+$acctid+"&lt;/H3&gt;";


If the $acctid is an integer, it's evaluating that and returning an integer.  The proper php concatenation operator is '.' (without the quotes), change your return statement to

return "&lt;H3&gt;Invalid acctid ".$acctid."&lt;/H3&gt;";


It'll evaluate to the string you're presumably expecting.