Paul said "what matters is KEEPING the Commandments of God" 1Cor 7:19 just as John insists in 1John 5:1-4. Christ Himself insists on it in John 14:15 when He quotes Ex 20:5 "Love Me and KEEP My Commandments" right out of the Ten Commandments.
This is not "keeping the commandments so the lost can earn salvation" because no amount of keeping the Commandments of God will make up for sinning. And all have sinned.
As Paul points out in Romans 8:6-8 the lost cannot keep the Law of God - but the saints do walk in obedience to it "by the Spirit putting to death the deeds of the flesh" Romans 8.
The lost cannot do that. But the saints can because as Paul reminds us in Hebrews 8 the New Covenant "writes the Law on the heart and on the mind" just as Jeremiah 31:31-33 stated.
In Romans 2:13-16 Paul makes it clear that "it is not the hearers of the Law that are just before God - but the doers of the LAW WILL be justified...on the day when according to my GOSPEL God will judge".
in Christ,
Bob
		
		
	 
You seem to make contradictory statements.  On the one hand you say the lost cannot be saved by keeping the law, but on the other hand you say that the saved CAN be unsaved by not keeping the law.  
Your error comes in the notion that keeping the law is a medium whereby one can transact salvation.  
Gal 3:1  You foolish Galatians, who has bewitched you, before whose eyes Jesus Christ was publicly portrayed as crucified?
2  This is the only thing I want to find out from you: did you receive the Spirit by the works of the Law, or by hearing with faith?
3  Are you so foolish? Having begun by the Spirit, are you now being perfected by the flesh?
Paul makes the point that, since they didn't attain their salvation through works of the law, they can't perfect (or for the sake of our discussion, 
imperfect -- they cannot modify, change, or condition their salvation by) their salvation by works of the law because their salvation (which is the acquisition of righteousness) has no basis in works of the law.  
Works of the law and following the commandments become important for the advancing, mature Christian as they learn to abide in Christ, and do His will and His work.  John says that following the commandments and law is loving God.  It is an advanced relationship skill with God meant for the believer who wishes to grow deeper and do God's will and work.  
Jhn 15:9  “Just as the Father has loved Me, I have also loved you; abide in My love.
10  “If you keep My commandments, you will abide in My love; just as I have kept My Father’s commandments and abide in His love.
11  “These things I have spoken to you so that My joy may be in you, and that your joy may be made full.
There is a purpose in following the commandments and keeping the law, but it has nothing to do with salvation or righteousness.  It has to do with being a productive participant in your relationship with God. It has to do with the fruit of the spirit being manifest in your life.  
You can't lose your salvation by not following the law.  Committing even one sin in your life shuts the door to that path to righteousness forever.  Your salvation is attained through faith, so the only way to lose it again would be to lose your faith.  But note:
Rom 8:3  For what the Law could not do, weak as it was through the flesh, God did: sending His own Son in the likeness of sinful flesh and as an offering for sin, He condemned sin in the flesh,
Rom 8:10  If Christ is in you, though the body is dead because of sin, yet the spirit is alive because of righteousness.
Think about it BobRyan -- your body will never see redemption.  God has condemned your flesh to die for your sin.  Even for the Christian, this is true.  The Law demands a death for sin, and your flesh will die, and will never be redeemed, justified, or saved.  Christ died to make your SPIRIT righteous.  It is this spirit man who lives even after the death of the body.  
1Cr 15:44  it is sown a natural body, it is raised a spiritual body. If there is a natural body, there is also a spiritual body.
45  So also it is written, “The first MAN, Adam, BECAME A LIVING SOUL.” The last Adam became a life-giving spirit.
50  Now I say this, brethren, that flesh and blood cannot inherit the kingdom of God; nor does the perishable inherit the imperishable.
51  Behold, I tell you a mystery; we will not all sleep, but we will all be changed,
52  in a moment, in the twinkling of an eye, at the last trumpet; for the trumpet will sound, and the dead will be raised imperishable, and we will be changed.
53  For this perishable must put on the imperishable, and this mortal must put on immortality.
So tell me... since our flesh is condemned, and the sin of our spirit has been exiled to our flesh, and our flesh will never see redemption, and our spirit is made righteous by the righteousness of Christ as an inheritance through our faith ... it begs the question ... what deed of our flesh can overcome God's grace?  What work borne of condemned, sinful, already dead flesh can make you even deader?  Our flesh and spirit have become separated.  If the salvation of the spirit doesn't effect the flesh, and the death that remains in our unredeemable flesh cannot overcome the righteousness we've obtained by our faith in the gospel, then how can you say that if one does not keep the commandments they will lose their salvation?
Surely this is true prior to being born again.  But once your spirit has been made alive in Christ by faith, then only by a loss of your faith can you lose that salvation.