refactored login system: parameterized it using command line parameters or -i interactive mode