Added Doctrine DBAL support and login check (although session causes SPL autoload error)