Thanks for your replies. The code is just to illustrate what I need to get back from the server. I will do it in a secure way, don't worry.
I need to know if there's a php file or anything else somewhere that takes a token, shop url and login data and returns maybe the account id or even just "correct login".
@Chris: the website is based on shopify and with something like:
https://xxxxxx.myshopify.com/admin/customers/search.xml?query=country:Germany
I can search for all customers in Germany for example. So I know what to do, soon as the login is verified.