logout fixes