In a large bowl, combine the flour, granulated sugar, salt, and yeast.
In a separate bowl, mix the warm milk, melted butter, egg, and vanilla extract.
Pour the wet ingredients into the dry ingredients and stir until a dough forms.
Knead the dough on a floured surface for about 5-7 minutes until smooth and elastic.
Place the dough in a greased bowl, cover with a kitchen towel, and let it rise in a warm place for about 1 hour or until doubled in size.
Prepare the filling by mixing the softened cream cheese and powdered sugar in a bowl until smooth. If desired, fold in the chocolate chips.
Once the dough has risen, punch it down and roll it out on a floured surface into a rectangle about 1/4 inch thick.
Spread the cream cheese mixture evenly over the dough.
Starting from one long edge, roll the dough tightly into a log and pinch the seams to seal.
Preheat the oven to 350°F.
Cut the rolled dough in half lengthwise to expose the filling.
Twist the two halves together and place in a greased loaf pan.
Cover and let rise for another 30 minutes.
Brush the top with the beaten egg.
Bake for 30-35 minutes, or until golden brown.
Let cool in the pan for 10 minutes before transferring to a wire rack to cool completely.