ここの一連のIF文が、分かりづらいというか、ちょっと違うというか・・・
```php
    if (!isset($_SERVER['HTTP_REFERER'])) {
      $ref_info = $this->_createSession();
      $ref_info->url = '/'; 
    } else {
      $parsed_url = parse_url($_SERVER['HTTP_REFERER']);
      if ($parsed_url['path']!= '/secure/login') 
      {
        $ref_info = $this->_createSession();
        $ref_info->url = $_SERVER['HTTP_REFERER'];
      }
    }
```