@ahmad
It looks like you're trying to load these characters through the browser's address bar, like "VL8LIKZ7fPQ". Probably you have some problem in the logic of the script.
Yes, all this can be done in BAS.
You can Wrap it in a Loop and specify the Number of times of Attempts to enter another Login.
Naturally, in the Loop there must be a Check Condition if and if it is true, then by Condition breac, stop the Loop at this point and continue further.
I translate via Google Translator.