register_user implementation