Fix basic authentication in the our deadlockless crutch

V1 ID: D-24325

@amoiseev-softheme please review