Move the queries in the User model

I think moving the query in the User model is better to mantain the controller clean.