Fix EZP-23126: do not redirect to /login when in legacy_mode
Merge pull request #918 from joaoinacio/EZP-23126_legacymode_login

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