added register user functionality