adjusted to block users from logging into portal if not set to that portal type, so long as .portal is set in setup.js