Fix several problems related to the captcha service