First bugfixes for lib_twig to get the backend/login to run.