adding function onClickRegister