client-side code for registration is done