add validation to user model. edit user permit in user controller. edit view to show avatar and filename.