I wondered why the password and the username were different from the words you mentioned in your article. I saw in the user.xml file, i.e. <username>arcgis</username><password>pa$$word</password>
and I put them everything was just OK. Thank you for your login window. My teacher asked me to create a window just as yours, but I can not code, with your code, and I can complete it. THS in the end.