In the login logic, there is a guard clause in that skips checking the database if the given username or password don't pass validations (eg: password length < 6).
res.status should be res.sendStatus; the former leaves the client hanging without a response.
In the login logic, there is a guard clause in that skips checking the database if the given username or password don't pass validations (eg: password length < 6).
res.status
should beres.sendStatus
; the former leaves the client hanging without a response.Also check for other occurrences of this mistake.