moving all db methods of User to the prototype