Kenmore Dishwasher control panel issues

Sometimes when I close the door and try to start a cycle by pressing the selected buttons nothing happens and the lights don’t light on the panel. Other times if I push the door shut firmly it all works fine. Last evening we started a cycle and itwas running fine then about an hour later I looked at the dw and every light on the control panel was lit. I opened the door and closed it and then nothing lit on the panel so I had to start the cycle over again.
Also the cap that screws in the inside of the door for the rinse agent leaks. How do I stop that from leaking.