Misplaced some code from users model and controller