public function preExecute()
 {
     $route = sgContext::getCurrentRoute();
     if (isset($route['is_secure']) && $route['is_secure']) {
         self::redirectIfNotAuth();
     }
 }
 public function GET()
 {
     header(ZendAuthPluginConfiguration::UNAUTHORIZED_HEADER);
     $route = sgContext::getCurrentRoute();
     $this->action = sgToolkit::url($route['path']);
     if (isset($_GET['destination'])) {
         $this->destination = filter_var($_GET['destination'], FILTER_SANITIZE_URL);
     }
     return $this->render('login');
 }
 function __construct($matches = array())
 {
     $this->matches = $matches;
     $this->matchedRoute = sgContext::getCurrentRoute();
     $this->base = sgContext::getRelativeBaseUrl();
     $this->title = $this->guessTitle();
     $this->site_name = sgConfiguration::get('settings.site_name');
     $this->scripts = array();
     $this->styles = array();
     $this->js_settings = sgConfiguration::get('settings.js_settings');
 }