Resolve logout issue