Changed username and reg_type fields to stronly typed