When you have two or more lines that should be connected, use the menu Create->Outline->Connect to make them into a single line. While you are drawing, it can happen that you end the drawing before the outline is fully created. You can simply create the rest of the line as a separate object, then select both and connect them.
When connecting lines, the head and tail of the first line in the sequence are preserved, and thereafter the lines that are being connected to it will be reversed as needed to ensure the nearest connecting point. You do not need to have your line endpoints adjacent, as a connecting line will be added for you if needed.