title: Sessions & User Authentication in Padrino
body: <p>I'm very new to Padrino (I come from a PHP background), and ruby web frameworks in general, and have been trying to figure out how to implement a simple user authentication and session management system, but have not really found much documentation on the subject. I know that padrino comes with a pre-built "Admin" package that includes user login/authentication, ect, however I'd rather roll my own from scratch, rather than trying to customize their solution to fit my own needs.</p>
  
  <p>So my question is, in Padrino how would I go about implementing a simple session-based authentication system for logging in users by setting session data once a user/pass combo has been validated against the database, retrieving that session data to check if the user is logged in when a request is made to protect certain pages/resources, use the session data to get the user's ID/role/ect, and then destroy that session when user logs out. As a PHP programmer I'm used to using the <code>$_SESSION</code> superglobal for this purpose, is there something akin to this in padrino/ruby? I noticed there is a <code>enable :sessions</code> in app.rb, is <code>:sessions</code> the pardrino equivalent?</p>