added logout fixes