Fixed logout issue