New feature: Added beforeLogout and afterLogout events for authentication plugins