modified user controller to save user