Changed some classes to Beans and User implements Serializable