Refactor user model and create migration