Make debug print optional and user authentication.

* Debug prints are optional (command line argument -d).
* Username and password can be specified at command line (args -u and -p).