added migration, fixed error of saving user