base code for login web server apps.