small fixes to user reg code