Flexible authentication solution for Node