Implemented a login gateway in preparation for user and beamline roles.