Hi @HIND BENKOUCH ,
According to your description and codes,I'm guessing that your problem is you can't use session when the user login.
In your codes,I have a problem.You shouldn't check if the textbox is null. You should check if the "r" is null after read the data.
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.