Battery plugs can sometimes feel as if they are plugged in all the way, when in fact, they are not.  The result is an intermittent loss of power that usually occurs when riding on bumpy surfaces.  The solution is quite simple, just make sure the plug is pushed all the way in.  See below:

Hopefully this will solve the issue for you!  Let us know if we can be of further assistance!