Express middleware to implement username/email/password authentication including registration and password management