[BUGFIX] Test loginUser before frontendUserRepository

Prevents a PHP warning if $GLOBALS['TSFE']->fe_user->user is not set