set the username that is passed to rpc based on options

set the username for rpc call based on --username passed
in command arguments, also added a unit test

Signed-off-by: Julius Gawlas <julius.gawlas@hp.com>
Acked-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>