You have to create a custom login page and logic
Create a non-persist entity for the login where the end user can fill in the credentials
and your logic should be in a Nanoflow like the attached below
See where is the best place to set the token logic in this Nanoflow
Please mark this answer as accepted answer if it answers your question