Updated functions to support new fields in class User