title: Zend_Auth best practices
body: <p>My goal is to require login for certain pages. I am using Zend Framework MVC, and I'm trying to find examples regarding best practices.</p>
  
  <p>Some notes on what I'm looking for:</p>
  
  <ul>
  <li>I want non-logged in users to get a login box, and then return to logged in version of the page, once authenticated</li>
  <li>I want to use dependency injection, and avoid singletons</li>
  <li>Small code footprint - tie into Zend mvc structure</li>
  <li>Should login box be a separate controller and do header redirect? How to return to landing page after auth success? An idea to simply call the login controller action to display the login box in the landing page, or is this a disadvantage regarding search engine indexing? </li>
  <li>Be able to use external library for handling cookies</li>
  </ul>
  
  <p>Or something completely different. I'm fairly new to the Zend framework, and I want to do it 'the right way'.</p>