update User and UserRepository for register