Prompting for user name and password is a common task. At least windows provides these dialogs native but this is just a generic implementation for now.