change from var to val and add synchronized to a mutable map for the User class