If you are having the following problems...
Error Code 6 (Undervoltage)
LCD Shuts Off While Riding
... you probably have a bad connection to the battery! It is extremely rare for the battery itself to go bad (unless you fry it with a different charger), and any sort of connection problem can be resolved quickly. Here are the places you should look for a bad connection:
1) Check Underneath the Battery
Check and make sure the 'claspers' on the bottom of the battery are in their proper position and did not get dislodged. These are what connects around the post on the bike. If they look like they are in the wrong spot or are bent then they will not make a good connection with the controller.
2) Re-adjust the Battery Rail
Possibly from shipping or through regular wear and tear, the battery rail might move out of its ideal position. It may be loose or too high not allowing the battery to make proper contact with the controller.
To check, with battery locked pull up on handle. Check for rattling and a gap underneath the battery.
To fix, undo the screw holding the black rail to the frame, lower the black rail as much as possible, and re-tighten it down.
When lowering rail, make sure it slides into slot at back of baseplate.
Re-insert battery into rail and check lock position, you may need to re-adjust the rail slightly to align with the battery lock. When complete the battery should be nice and snug and not have a gap at the bottom!
In rare occurrences, it is not possible to lower the rail enough due to interference between the screw and the slot in the rail, it may be required to open up the slot or replace it with one with a larger slot.
Once rail is in its ideal position, remove the battery and tighten down as much as possible.
That should solve your problem! You may have to adjust the rail a couple of times to make sure it is down as much as possible while still allowing you to lock the battery in place. Once it is in the ideal position make sure to tighten it down as much as possible.