Based on the history you provided, urinating outside the litter box may be a behavioral problem. However, a behavioral issue should not necessarily be assumed until all possible medical causes for the inappropriate voiding are effectively ruled out, namely lower urinary tract disease or hyperthyroidism. Please refer to the articles below for all the different presentations of this diseases:
Lower urinary tract disease
Hyperthyroidism
Per the article, a thorough examination should be performed by a veterinarian, as well as urinalysis, bloodwork, and possibly x-rays. Behavioral voiding outside the litter box can only be assumed once a work-up of this kind has not revealed any underlying medical problems. Behavioral urination can be treated by minimizing stress in the home, adding one or two more litter boxes in other places to increase accessability, and making sure litter is scooped daily and changed out weekly to keep the litter as clean as possible.
If these measures do not work, you can try using Feliway plug-ins, devices that eminate a calming pheromone that people cannot sense, but can have a calming influence on cats and help to resolve behavioral issues.
Should all of the above fail, you should speak to your veterinarian about the possiblity of prescribing your cat a seratonin increasing behavioral medication. The two most well established in terms of safety and efficacy in cats are amitriptylline and fluoxetine.
Should you wish to consult with a veterinarian 24 hours a day, 7 days a week, please visit our Ask the Vet page: