You can create two routes for the same function, or you could consider just passing parameters as url params instead, or you can rely on prefix matching.
PS Don’t put passwords in urls, they get logged, recorded etc. and don’t use GET for actions which change state. Normally a login sequence would be:
GET login form (at say /login )
POST login form to another endpoint with the data in the body, not the url
The form of url you’ve used here is more often used as a way of addressing a specific resource, e.g.: