Controlling NMOS gate switch with PMOS
You need a drain resistor on the gate of M1. And by drain, I mean from the gate to ground. 

The gate has a capacitance that needs to be drained off or the channel will remain open. Select a resistor size that will drain that in the order of magnitude of time that is reasonable for your application.