Andromeda: losing weight while taking the OCP should't stop you getting your period. The period you get while on the pill isn't a real period - it's a withdrawl bleed. Therefore, there isn't a normal menstrual cycle for weight loss to interfere with, as the cycle is dictated and controlled by the OCP.
If you were not on the pill and stopped menstruating because of being underweight, getting back to a healthy weight should restore normal menstruation and fertility.