Just wondering what type of food you are feeding?
I had the same problem with Raustyk, except hers went n for years and was also accompanied by a few other symptoms. Even allergy tests & the like dhowed nothing related to diet but I changed her to Butro and all the problems went away. A few years later I ran out of food & could not get to the store so my mother picked up a bag of Maximum Nutrition (walmarts food, based on purina as well, yet I did not know that at the time otherwise I would not of fed it) and within a few days all the symptoms returned. I did a study on it a few years back & come to find out it is a VERY common thing with Purina diets. But even if you are not feeding purina it may be worth a shot to try a different food.

I would also suggest a second opinion and possibly some blood work.
As far as the early spaying goes I have also heard that they sometimes cure unexplained UTI's and at 5 months of age I don't think it's too terribly early to spay her.

I wish you the best of luck, from personal experience I know UTI's are not fun, dog nor human. lol