Working with database. changed user model and controller