add password field
refactoring & minor tweaks
supporting multipart forms/files