add tests user_spec, add factory girl, change business logic from controller to model