Do not execute anything if we are on the index page because no User is logged in
adjust Environment call to be compatible with contao 2.11
Merge pull request #545 from Zeromax/fix-initilaize

Do not perform any action when URL is backend index.php.