authentication for mongoose modules