Moved commands into separate module and fixed USER and PASS login sequence.