John warns against evil spirits that are out in the world. In verse 2 we are given a promise that if we have the Holy Spirit in us then no evil spirit can be within us either. He is mainly just warning the people to open their eyes to what is around them. In verse 6 he brings out the point that since we have communication with God then we will notice the evil spirits by who listens to us and who doesn't. "By this we know the spirit of truth and the spirit of error."
Again he speaks on love in these verses from now till the end of the chapter. God is the source of love and expects us to be proper channels of love to those around us. In verse 10 and 19 it talks about God taking the initative not us because of His love to send us His only Son. When we love one another, God's love is more and more perfected in us.
Paul continues to reassure the people that they are saved because the Holy Spirit is within them. He also brings out the big point that not only he but also several others have actually seen Jesus. He knew that Jesus was really sent to save us from our sins. John walked beside Jesus for three years, watch His miracles, listened to His words and then stood at His feet when He died. Because of this assurance and promise we as Christians can have confidence when Christ comes again that we will not perish.