code regiter a user logic