Hello,
Thank you for your query at DoctorSpring.com
The back pain has probably happened because of urinary tract infection and should settle down. However if it persists then you should get ultrasound done to rule out stone disease.
Urinary tract infection has probably happened because of several activity as you have also mentioned. There is no fool proof method of preventing the infection. The infection usually happens because of lesser of lubrication prior to intercourse and the resultant trauma to local tissues. You can indulge into longer foreplay so that both of you get well lubricated and also use condom for at least next few weeks.
Take care
Sincerely
Rajiv Goel