Added preferences to the database and user class