Fix logout bugs with barcode mode operator