Fix determining if materials request is enabled when the user logs in from the materials request page
Code cleanup