Flexible authentication library for nodejs with mongoose