Added support for authentication