logout dunction does not work