You got off very lucky. Could have been the driver or someone in the car was wanted for something, there could have been something illegal in the car, any number of things. When you hit a vehicle from behind, it is ALWAYS your fault. In my state a motorized bicycle does not require insurance. But that does not absolve you from any damage you may cause. The owner of the car could have called the cops, made out a report, you would have received a ticket, then they could sue you, or if you are under 18, your parents, for damages. With today's plastic cars, even a minor hit could require replacement of the bumper cover, at an average cost of $2000. And you would likely be required to pay it.
I would not ride that bike again until it is safe, whatever that takes. A rear brake is practically worthless. Never ride without a front brake, and make sure it is a GOOD front brake, and properly installed. One reason I only use bike shop bikes with name brands, like Trek and Specialized. You can find used ones on Craigslist, and they come with high quality brakes. A motor puts a lot more stress on a bike than it was designed for. So since you are pushing it already, don't cut any corners.
It does sound like you need more riding skill. Would you have hit the car had you been riding a regular pedal bike? If you think so, then you need some serious rider training. You should be an excellent bicycle rider before even thinking about putting a motor on your bike. I am also a motorcycle rider (street and dirt) and have been riding on the street for 40 years. I have ridden everything from 50cc mopeds to 1000cc sport bikes, to 1500cc cruisers and Goldwings. In over half a million miles, I have never had an accident on the street. I didn't take tha mSF course till 10 years after I started riding, because it wasn't available. Go get some training before you get yourself killed, or wind up in SERIOUS legal trouble.