Prevent password reset urls from being redirected at login
The simplest way would probably be to just test for the path, which you can get access to via arg(). Something like this would do the trick:

function hook_user($op, &amp;$edit, &amp;$account, $category = NULL) {
  switch ($op) {
    case 'login':
      if (_cns_user($account) &amp;&amp; !(arg(0) == 'user' &amp;&amp; arg(1) == 'reset')) {
        unset($_GET['destination']);
        unset($_REQUEST['destination']);
        drupal_goto('user/'. $account-&gt;uid .'/training', NULL, 'steps');
      }
      break;
  }
}