A php class for authentication and session creating