Fix disconnect on logout