/**
  * Logout a user and redirect back to the login page
  */
 public function logout()
 {
     $user = new \Sonic\Model\User();
     if ($user->initSession() === TRUE) {
         $user->Logout();
         new \Sonic\Message('success', 'Logged out');
     }
     $this->template = 'admin/login.tpl';
 }
 /**
  * Check authentication status
  * TRUE for authenticated, otherwise error string
  */
 public function status()
 {
     $user = new \Sonic\Model\User();
     return $this->success(array('status' => $user->initSession()));
 }