Fix crash if client is unauthenticated