refactor monitorservice and fixed an account deletion bug