Adds simple form validation to user login page (for use elsewhere, too)