This is the code for captcha implementaion.