Add code to move --user and --password in cli

* moved --user and --password flags before any action
* added test

Change-Id: I68ae8d15f519ff220d7121b49387013f189e3aa1
Closes-Bug: #1385613
Merge "Add code to move --user and --password in cli"