Refactored User class in the server