Must slam door on GE Profile Microwave to get light to go out

I must slam the door on our GE Profile microwave to get both the light to go out and to get it to work. The ON button seemed to malfunction today so I took the cover off got the button working, but I am back to having to slam the door to get the light to go off and get it to work. What part(s) do I need to replace. Otherwise it works fine.