How to use hook_user_login and hook_user_logout to output content to the page
It will not work in template.php
You need to add this in a module file, check here on howto
instead of myTheme it will be modulename
If module name is foo then it will be foo_user_login

    // @file : foo.module
    function foo_user_login(&amp;$edit, $account) {
      fluenz_user_function($account-&gt;uid);
    }
    // and this function name was also different just an FYI
    function fluenz_user_function($uid) {
      for ($i=0; $i &lt; 1000; $i++) { 
        echo 'hi&lt;br&gt;';
      }
    }