this uses a spry validation text field for the user name and a spry validation password field for the password.
to add spry form elements to your page, go to Insert -> Forms -> Spry Validation text Filed or Spry Validation Password field.
once added to the page, click either the text or password field, notice the blue bounding box, click the blue bounding box to open the spry settings in the property inspector.
you can set minimum and maximum characters there.