urine infection

I got a urine infection after me and my boyfriend had unprotected sex and I had one swipe of really light bleeding and I haven't had it since, is that normal for a urine infection? Or is it just because it was my first time unprotected?