I do not know how plainer John could have been concerning who is of God and who is of the devil,
“Little children, let no one deceive you. He who practices righteousness is righteous, just as He is righteous. He who sins is of the devil, for the devil has sinned from the beginning” (1 John 3:7-8a).
If you practice righteous, you are of God.
If you practice sin, you are of the devil.
If you find yourself being of the devil, repent and start doing what is righteous.