added support for authentication