Fixed issue with logout