I see the problem. The "First Name" and "Last Name" fields do not need to be set up as custom fields. As you have it, the first name is Custom Field #1 and the last name is Custom Field #2, set up as the variables "user1" and "user2".
First Name: <input type=text name=user1><br>
Last Name: <input type=text name=user2><br>
The script is expecting the first name in the variable "fname" and the last name in the variable "lname", as follows:
First Name: <input type=text name=fname><br>
Last Name: <input type=text name=lname><br>
The signup code generator contains checkboxes for First Name and Last Name but if you have 2 custom fields also named this it would be easy to become confused.