completed registration.js with verification code method