auth.js: authenticate function does not handle rejection from db.getUser, which rejects on second call due to counter in db.js, causing an unhandled promise rejection that fails silently.
