updated model to include logged in field