adding optional authentication handler