Implementing CAPTCHA using purely javascript and canvas