pkgdb2_cli: Ask for password only if required

Use login_callback to ask for username/password only when it is
required.
Merge pull request #13 from tyll/cli

pkgdb2_cli: Ask for password only if required