The initialization of a Backend user for Frontend Contexts is currently
bound to TSFE, however, the only parts where TSFE is actually
needed is to set the flag "beUserLogin".
Additionally, the initialization of the Language object is now
moved into the middleware, directly after the set up of $GLOBALS['BE_USER']
to allow the admin panel to use $GLOBALS['LANG'] as well.
Further steps are to deprecate "$TSFE->initializeBackendUser()" method,
and to deprecate the hooks, as they can now be implemented as PSR-15
middlewares.
Additional cleanups on the Authentication object will follow separately
once all Middlewares and the Request object are in place.
For now, this patch aims to extract the logic and keep maximum backwards-
compatibility.