Soak pinto beans over night. Bring to boil, reduce heat and cook until beans are tender. Cook onions in veggie broth or wine. Combine with beans. Place in casserole dish. For the crust, mix together the cornmeal, flour, baking powder, and salt. Gradually add the yogurt and water, then mix until smooth. Stir the sugar and cayenne into the batter. Pour onto the bean and onions. Cook in 350 degree oven until the top is bubbling and the crust is just beginning to brown at the edges.