fixing logouts