Move user sorting to tasks controller