Added field validation for login and registration pages