Andre, There are several ghost towns and gold rush towns were people still live along Hwy 49 starting at Oakhurst and going north. You can google California gold country for websites. Here are three that you can try
www.calgold.org
www.visitcalifornia.com/Explore/Gold-Country
www.historichwy49.com
There is also Columbia State Historic Park that is on the 49 Their website is:
http://www.columbiacalifornia.com/One of the most popular ghost town in the Yosemite area is at Bodie State Historic Park. The park is on hwy 395 on the eastern side of the Sierra Nevada and north of the town of Lee Vining. Their website is: www.bodie.com
If you want to stay in Yosemite Park then you need to try to get reservations now since they book a year and a day in advance. May is not as crowded as the summer months but I would book your hotels where ever you go as soon as you have an idea of where you want to go and how long you want to stay in each area. If you want to stay outside of the park, then Yosemite View Lodge or Cedar Lodge and are around 20 minutes from Yosemite Valley. There are also rental houses in Foresta which is inside the park and they are also close to the valley. Yosemite West has bed and breakfasts, condos and houses for rent. Yosemite West is not in the park boundary but you can only access it by going into the park. It is around 20 minutes to the valley from there. Lodging can also be found at the Redwoods in Wawona and also in Fish Camp which is just outside the 41 entrance. Oakhurst is a town of 13,000 about 1 1/2 hours from Yosemite Valley. There are numerous lodging in the town.
As for costs, there are some many different places to stay at and a wide difference in price. You will have to look up the areas I mentioned on the internet to see what kinds of lodging and their costs.
Other than the times I have camped in Yosemite Valley, I don't have any personal experience with camping in the area but there are other people who post here that can give you suggestions.