If we obey God's commands, then we are sure that we know him.
If we say that we know him, but do not obey his commands, we are liars and there is no truth in us.
But if we obey his word, we are the ones whose love for God has really been made perfect. This is how we can be sure that we are in union with God:
if we say that we remain in union with God, we should live just as Jesus Christ did.