If it cuts out again check to see if you lose the lcd/led display indication.
Much like a petrol engine just needs fuel,air and a spark the electric motor needs uninterrupted power from the battery but also the 5v generated by the controller for the throttle, pas and display to switch the motor...