EZP-20898: Fixed legacy URL generation irt _fragment

Prevents _fragment from being used as siteaccess part,
leading to invalid generated legacy URLs.
EZP-22193: don't include the legacy toolbar if not authorized