cleanup msg size, added logout confirm