title: Codeigniter login to controller
body: <p>Hey! I'm very new to Codeigniter, I'm trying to protect the entire admin controller. I figured I'd start here:</p>
  
  <pre><code>function Admin()
  {
      parent::Controller();
      if(!isset($_SESSION['loggedin'])){
          $this-&gt;login();
      }
  }
  </code></pre>
  
  <p>but this is obviously incomplete. How do I also stop the method that is trying to run ( ie index() ), and am I on the right track here??</p>
  
  <p>Thanks for your help!!</p>