regUser added inside if loop