fixed bug with logout