first of all sorry for being out of the discussion so far, it completely passed out of my mind and the forum didn't send to me any "notification" about the answers.
By the way, finally I solved it quite easily once I read the following discussion: https://www.mql5.com/en/code/10121
In particular I implemented a the call of a GET method to a php file and passing in the url the search field (i.e.: MT4 account number, userID, MT4 account type). The php server performs a query on a DB and returns the result through an echo command. The answer is trapped as result of the GET method and it's used to check if the user is authenticated or not.
Thanks to all for you hints and support!