save user to db on register