logout improvment