The ugly loop at the end is common, since the stitch isn't connected to anything at one side. You can make a point to pull that stitch very tight and hold the tension on the yarn when you knit your next stitch.
Another way to minimize the loop is to slip the first stitch of every row. This gets the edge stitches knit only every other row (when it's the last stitch) and evens out the edge. When you're doing something that will be seamed later, though, it really doesn't matter since it's never seen again.
