Logged out warnings: restructure the PHP code (no need for a class), props nacin, see #23295