Login redirect issue

need to redirect http://localhost:8765/ to http://localhost:8765/users/login in cakephp5 if user is not logged in from whatever the page is . I am using authentication plugin and using cakephp 5.0

Have you followed the example in the tutorial? It will redirect there by default if you have the middleware and getAuthenticationService configured as shown.

Check here https://book.cakephp.org/5/en/tutorials-and-examples/cms/authentication.html

Thnks jmcd73
I have a question can you tell me how to create separate login for admins means i have src/Controller/Admin/userscontroller

need to create it