God loves his people and it has absolutely nothing to do with the way they are, because his love for them is THROUGH CHRIST. It has everything to do with who Christ is, and through our union with him, who God considers us to be.
That is the doctrine of justification by faith, that God considers us perfectly righteous, not because of anything we have done, but because he has counted Christ's righteousness as ours.
By the work of his Spirit, he then conforms us to the image of his Son, in this life but in part, through the process of sanctification, and fully in glory. He is restoring the image of God in man that was marred at the fall.