Ok John tells us what these commandments are...he is not talking about the law of Moses. To have faith in Christ and love as Christ commanded us...which by the law IS THE ONLY WAY to fulfill the law...But being under the law itself is not of faith...because faith is trusting in the work of the Cross...not in our own works.
The problem is that you think that our Lord Jesus only gave two commands, when He actually states every word that He gave is a command because it comes from the Father and therefore should be obeyed and followed.
Matthew 22:37
Jesus said unto him, Thou shalt love the Lord thy God with all thy heart, and with all thy soul, and with all thy mind.
Matthew 22:39
And the second is like unto it, Thou shalt love thy neighbour as thyself.
These are not the only two commands that the Lord gave, He only says that all the law and the prophets rest on these two because by following these two you will keep and follow the rest;
Matthew 28:16-20
The Great Commission
16 Then the eleven disciples went to Galilee, to the mountain where Jesus had told them to go. 17 When they saw him, they worshiped him; but some doubted. 18 Then Jesus came to them and said, “All authority in heaven and on earth has been given to me. 19
Therefore go and make disciples of all nations, baptizing them in the name of the Father and of the Son and of the Holy Spirit, 20 and teaching them to obey everything I have commanded you. And surely I am with you always, to the very end of the age.”
Luke 6:46-49
And why call ye me, Lord, Lord, and do not the things which I say? Whosoever cometh to me, and heareth my sayings, and doeth them, I will shew you to whom he is like: He is like a man which built an house, and digged deep, and laid the foundation on a rock: and when the flood arose, the stream beat vehemently upon that house, and could not shake it: for it was founded upon a rock.
But he that heareth, and doeth not, is like a man that without a foundation built an house upon the earth; against which the stream did beat vehemently, and immediately it
fell; and the ruin of that house was great.
Matthew 7:21
Not every one that saith unto me, Lord, Lord, shall enter into the kingdom of heaven; but he that doeth the will of my Father which is in heaven.
He command repentance (Luke 13:3), baptism (Matthew 28:19, Mark 16:16), confession (Matthew 10:32-33), forgiveness to others (Matthew 6:14-15), and the rest He said falls under all of these as it all falls under things that will be done out of love for Him.