fix bug with logout