added user role middlewear, and pre-save placeholder