The edge ideal associated to graphs with loops