add support for custom authentication callbacks