Gracefully quit when user presses ctrl-c while he is prompted for username/password.
Intercept KeyboardInterrupt and EOFError exceptions when waiting input from user.