login form template with validation