Auto shut down AC Power

If you want to control the switch off from a microcontroller, simplest approach is to use an AC mains push button. Bypass the button with an SSR controlled by the microcontroller.

Alternatively, leave the device powered from the mains, but use a power supply with low standby power consumption. For example, here http://proto-pic.co.uk/usb-power-supply-adaptor-uk-plug-1-2a/ is a 5V 1.2A power supply with a standby power consumption of just 0.17W. You don't need to power the microcontroller off, just put it in power down sleep mode.