Added the code you send me

it is working but when you log out and want to login again as the same
user it doesn’t open the frame