title: Codeigniter authentication before every controller and action
body: <p>I am writing a web application using codeigniter.<br/>
  I want to authenticate the privilege of our users before they access the page.<br/>
  Actually nearly all controller action except the log in page need to call the model and use </p>
  
  <pre><code>$this-&gt;Users-&gt;validate($username, $password)
  </code></pre>
  
  <p>I want to make it general for every controller. Do I need to inherit the controller class? How could i do that?</p>