Curve merged but weird twist happens?
Make sure that in the Global Transforms the segments have the same tilt:

When two segments have different tilt (90 and -90) you'll get a loop when you connect:



Wehn the segments have the same tilt, the segment will be straight:



If one of your segments is flipped try this:

Deselect all (A)

Select one control point and then select linked (L)

Rotate the whole segment 180 degrees by adding +180 on the Mean Tilt section.

Link it then with the other section.