on regiter sending details to the databse