You will want to use the script step "Re-Login", found in the Accounts group of script steps when viewed by category. If you execute it with a dialog, it will open the normal authentication dialog box you see upon opening a file, allowing you to specify the user name and password. If you execute it without a dialog, you are able to specify both the Account Name and Password in the "Specify Options" area when setting up the script step.
If you know the accounts you want to use in your testing, just write a script for each account with a "Re-Login" as the only script step. Then specify the account name and password, and select the "Perform without dialog" option. Then, changing the accounts is simply a matter of selecting the script that matches the account you would like to test.
Good luck, and happy scripting.
very good hint. Very easy. Exactly what I was looking for. Thanks a lot!