What are you trying to do? Determine if a user exists within Blesta based on their login?
If you are trying to use the Blesta API there is no need to "login" as the API requires Basic Auth with unique API creds, which is what you have done via aUser and aKey.
If you are trying to determine if a user exists within Blesta based on their username and password, use the auth function instead of login. http://source-docs.blesta.com/class-Users.html#_auth
Post to: api/users/auth.json
With form data:
const params = new URLSearchParams({
"username": vars.username,
"vars[username]": vars.username,
"vars[password]": vars.password,
"type": "any"
});
It will return true if the users exists otherwise false if the user does not.