Look closely at the area of the battery. In the removal/replacement it is likely you knocked a vacuum line off or broke a plastic nipple. This will give you a vacuum leak which would be the source of your lock/unlock problems, probably the shut down problem too.
'73 280SEL 4.5 (9/72)- RIP
Only 8,173 units built from 5/71 thru 11/72
'02 CLK320 Cabriolet - wifey's mid-life crisis
2012 VW Jetta Sportwagon TDI...at least its a diesel
Non illegitemae carborundum.