Hi there, I think I might have a solution to your problem.
Start with a standard teststep loop
1.if( context.loopIndex == null )
Then inside the loop ask for a username to be input. If you have a database of users you will need to call a function to check it and verify the username and password.