Fixed User class.
Added some utility functions to User class.