fixing broken logout issue