Move User entity code into the queryable block in User