Dehydration could well be the cause of these headaches, the coverings of your brain are very sensitive to changes in blood pressure hence why you get a headache when you get dehydrated. If you are peeing clear when you finish the ride though, its probably unlikely that you have been too dehydrated during the ride, as already has been said.
The other option is that they could be exertional headaches, again due to changes in your blood pressure. They are reasonably common, people sometimes get them after sex! They are meant to respond well to indomethacin which is an antinflammatory drug, which can be taken before the excersise. They are most common with things like running and burst type sports like weight lifting, but I guess there is no reason why mountain bikes couldnt cause them. They are usually nothing to worry about, although not very pleasant.
Things to watch with headaches are for a sudden onset, worse than any previous headache, if you have neck stiffness, if you get it in the morning, and if it is there all the time and if you have any other neurological symptoms. If you haven't got any of these features its more than likely nothing to worry about.