Hi Chris. Welcome to justanswer.
How old is your laptop?
Chris, turn off the laptop. Then remove the mains cable. Turn the laptop upside down and remove the battery. Now wait for an hour. Then again plug the battery back and connect the mains cable. Once the laptop has booted successfully then remove the mains cable and check if it still turns off or not.
Most probably the battery of the laptop has gone bad. You will need to replace it. That would be the ultimate fix.
The issues you are facing are the typical problems that happen when the battery of the laptop reaches its end of life. Since it has already been one and a half year, the battery has become faulty and is not able to hold the charge. That is why the laptop cuts out when you remove mains cable. If you don't wish to replace the battery then you can keep using the laptop through ac mains.
Chris, do not use the mains power all the time. Run the laptop on battery once in a week. Do let me know if you want links for buying a new battery.
Please rate the chat positively by clicking the 5 stars present on the upper panel so that I can get credited for my services. Thanks