function doSubmit(){
// get the chosen option
user = document.forms.login.user.value;

// now set this value as action for the form
document.forms.login.action=user; // +".php";

// and submit
document.forms.login.submit();
}