client side for registration