You need to create a compiled version of the script, specifying your username and password when exporting. Actually, this is what the premium version is for.
@LongDong foreach works with lists, but @UserTrue suggested the option of how to take account strings from resources multiple times in 1 thread.
resource is not a list.