DNN-5649 improve captcha logic
DNN-5649 improve captcha logic