Justification according to Luther was by "faith alone". He was rebelling against salvation by prescribed works such as the "sacraments" of the Roman Catholic church. However, he went too far. Faith needs to be expressed in works of loving obedience to the commandments of Christ but NOT to the commandments of men. In correctly rebelling against the former, he didn't recognize the latter. He "threw out the baby with the bath water" as my parents used to say!
James 2:26 For as the body without the spirit is dead, so faith without works is dead also.
Luther's insistence on salvation without any effort other than belief on our part has led to downright silly doctrinal stances such as "once saved always saved" and the elimination of the need for baptism by immersion as a demonstration of faith and an act of commitment because it is a "work". If one will not be obedient in a simple thing like the Lord's commandment to be baptized, it is a good bet that obedience in other things will be hard to come by as well.
Matthew 15:8,9 This people draweth nigh unto me with their mouth, and honoureth me with their lips; but their heart is far from me. But in vain they do worship me, teaching for doctrines the commandments of men.
This salvation by belief alone is a "cheap salvation." Jesus didn't do everything for us. He opened the way of salvation and showed us that way. It is the way of the cross. He expects us to do our part. If we are faithful and trying with all our hearts to obey his commandments he will extend his Father's love and mercy to us in forgiveness for our shortcomings.
Matthew 16:24Then said Jesus unto his disciples, If any man will come after me, let him deny himself, and take up his cross, and follow me.
If you "do" what Christ commands - or at least try your best to do it - you will find yourself in the ranks of those whom he calls friends.
John 15:14 Ye are my friends, if ye do whatsoever I command you.
I hope you have found this helpful.