Added events afterLogin / beforeLogout