adds itg-staff login test; refactors code.