more updates to user model; add flagging table and model