*** old/login/index.php	2010-07-06 11:12:18.000000000 -0400
--- new/login/index.php	2010-07-06 11:16:58.000000000 -0400
***************
*** 253,260 ****
          ? $_SERVER["HTTP_REFERER"] : NULL;
  }
  
! /// Redirect to alternative login URL if needed
! if (!empty($CFG->alternateloginurl)) {
      $loginurl = $CFG->alternateloginurl;
  
      if (strpos($SESSION->wantsurl, $loginurl) === 0) {
--- 253,261 ----
          ? $_SERVER["HTTP_REFERER"] : NULL;
  }
  
! /// Redirect to alternative login URL if needed, and if user login has not been 
! /// prevented with an error message.
! if (!empty($CFG->alternateloginurl) and $errormsg === '') {
      $loginurl = $CFG->alternateloginurl;
  
      if (strpos($SESSION->wantsurl, $loginurl) === 0) {
