Improved FORCED_LOGOUT function