Flexible authentication system for the Kohana Framework