Show captcha only when necessary