Fix nullptr on disconnect for unauthenticated clients.