core: Avoid logout when restarting mmc agent