make logout test more robust