Multi-Tenancy Laravel (Client-Server)

I have 2 projects
-> client: frontend
-> server: backend

My client is running at localhost:8001 and Server at localhost:8000

So, I open the localhost:8001 in my browser, and try to do the login
I’m using fortify to do the login, the project was already created. I’m trying to add multi tenancy

Request is sent with localhost:8000 in the header with username and pwd

How can I make a login connection if I have multi databases and how can I use backend to connect to right DB?
Is Synced resources a good way to do this first step?

We have a global users table, compare email and pwd?