Some things to try:
- Make sure there isn't any grease on dropouts, axle, or bolts.
- Make sure the nuts for the rear axle have some bite to them.
- Make sure the rear hub has some bite to it where it touches the rear dropouts.
- More spinning the pedals, less hammering on them.
- Increase the size of the rear cog, and if you need to, the front chain ring. If you don't see how this can help, do a free body diagram, Hint, it's a lever problem.*
- Get chain tugs**
*: Imagine your going up a really steep hill and your allmost at a stop. Regarless of anything else, the force appled to the bottom of your wheel must be constant to keep you from going in reverse. Now do a free body diagram on the wheel. In statics, we can sum the moments about any point, so choose the point which the chain connects with the rear cog. If A is the force applied to the wheel by the axel, G is the force applied to the wheel by the ground, r is the rear cog radius, D is the rear wheel diameter, Then summing the moments we have that A*r-G*(r+D) = 0, solving for A, we have that A = G + G*D/r, so as r is increased, the force at the axel is decreased. These results won't deviate much if a fully dynamics system were to be concidered.
**: Make sure the chain tugs that you get are beafy, small spindaly chain tugs are only designed to take the forces needed to properly position the tire in the drop outs and will bend or break if they need to take pedeling loads due to slipage of the rear axel.