In a large oven safe pot, Dutch oven or baking dish, combine the soaked beans, 1 cup cooking liquid, onion, ketchup, brown sugar, molasses, mustard, apple cider vinegar, salt, pepper, bay leaf, and bacon (only add bacon if not using ham bone). Mix well. If using ham bone, tuck it into the beans. Cover and bake for 4 ½ to 5 hours or until the beans are very tender and sauce has thickened to desired consistency. Stir occasionally and add more of the reserved cooking liquid if needed during the cooking time.