adding support for overriding auth key, error callback for 401 403