Making User class serializable