Hey
You can’t log the user in into your system using backend code because the Wix Users library is not usuable in backend code what I have found out.
What is your goal from the app?
I use a web page inside apps to make the user login and then I get back the users contact ID and I store that and then I use that in backend queries when querying their data, _owner = contactId will work even in backend code.