Authentication is tedious. Many projects need some sort of authentication system. And in many of these projects you will basically start from scratch. That's why
cbauth was created.
cbauth is a library that handles creating user sessions for your app including authenticating users, logging users in and out, and retrieving the currently authenticated user. It is customizable to plug in to your existing authentication method and session storage.
These are some of the methods you can use in your project:
auth.authenticate( username, password );auth.isLoggedIn();auth.getUser();auth.logout();