fixing error with logout