Register page

DRY: Split attribute generation into helper function.