Of course God is love but does that automatically mean he loves us if we disobey? Definitely not. The nature of God is holy and he always wants to clean us up so that he can have a relationship with us:
Be separate from the people of the world:
2 Corinthians 6:15-18 King James Version (KJV)
15 And what concord hath Christ with Belial? or what part hath he that believeth with an infidel?
16 And what agreement hath the temple of God with idols? for ye are the temple of the living God; as God hath said, I will dwell in them, and walk in them; and I will be their God, and they shall be my people.
17 Wherefore come out from among them, and be ye separate, saith the Lord, and touch not the unclean thing; and I will receive you.
18 And will be a Father unto you, and ye shall be my sons and daughters, saith the Lord Almighty.
Jesus wants a relationship with you:
Revelation 3:20 King James Version (KJV)
20 Behold, I stand at the door, and knock: if any man hear my voice, and open the door, I will come in to him, and will sup with him, and he with me.