updated to work with mgrast login