Update lib/basicAuth.js

Calling res.end() does not terminate middleware's execution. Explicit exit from the function is necessary to prevent unwanted side-effect, which can include a "Error: Can't set headers after they are sent." from another (later) middleware.