better logout process