Added generic User Model definitions to cover custom User Models. Used smart_str() instead of str() to cover non-ASCII character changes.