Fix EZP-23126: do not redirect to /login when in legacy_mode

JIRA: https://jira.ez.no/browse/EZP-23126

Problem:
When in legacy mode, accessing a restricted content will cause a redirect to /login, instead of displaying the embed login (by default).

Solution:
Do not throw `AccessDeniedException` in SF when using legacy_mode

Note: This was not observed in admin siteaccess as the login page returns a HTTP 200 status code, unlike accessing restricted content.