Having grown up attending a Lutheran church, (my parents still attend there) I do find that troubling.
The problem is that many take those verses where Jesus says those who "do good" will have eternal life, out of context. Those verses are not referring to our "good works" at all, but rather, to our faith in Christ. We can see this clearly if we look at the surrounding verses to see what Jesus was teaching in proper context:
24 Verily, verily, I say unto you, He that heareth my word, and believeth on him that sent me, hath everlasting life, and shall not come into condemnation; but is passed from death unto life.
25 Verily, verily, I say unto you, The hour is coming, and now is, when the dead shall hear the voice of the Son of God: and they that hear shall live.
26 For as the Father hath life in himself; so hath he given to the Son to have life in himself;
27 And hath given him authority to execute judgment also, because he is the Son of man.
28 Marvel not at this: for the hour is coming, in the which all that are in the graves shall hear his voice,
29 And shall come forth; they that have done good, unto the resurrection of life; and they that have done evil, unto the resurrection of damnation. - John 5:24-29
Jesus is absolutely clear, they that hear His word and believe do have "everlasting life", shall not come into condemnation and have "passed from death to life."
We know that this life eternal is in the Son, and that faith comes by hearing and hearing by the word of God.
Jesus is not teaching works based salvation here (nor does He anywhere else). "Doing good" is to hear and believe. We are saved by grace, through faith, not of works. It is the gift of God.
Jesus also says this:
27 Labour not for the meat which perisheth, but for that meat which endureth unto everlasting life, which the Son of man shall give unto you: for him hath God the Father sealed.
28 Then said they unto him, What shall we do, that we might work the works of God?
29 Jesus answered and said unto them, This is the work of God, that ye believe on him whom he hath sent.
30 They said therefore unto him, What sign shewest thou then, that we may see, and believe thee? what dost thou work?
31 Our fathers did eat manna in the desert; as it is written, He gave them bread from heaven to eat.
32 Then Jesus said unto them, Verily, verily, I say unto you, Moses gave you not that bread from heaven; but my Father giveth you the true bread from heaven.
33 For the bread of God is he which cometh down from heaven, and giveth life unto the world.
34 Then said they unto him, Lord, evermore give us this bread.
35 And Jesus said unto them, I am the bread of life: he that cometh to me shall never hunger; and he that believeth on me shall never thirst.
36 But I said unto you, That ye also have seen me, and believe not.
37 All that the Father giveth me shall come to me; and him that cometh to me I will in no wise cast out.
38 For I came down from heaven, not to do mine own will, but the will of him that sent me.
39 And this is the Father's will which hath sent me, that of all which he hath given me I should lose nothing, but should raise it up again at the last day.
40 And this is the will of him that sent me, that every one which seeth the Son, and believeth on him, may have everlasting life: and I will raise him up at the last day. - John 6:27-40