added a middleware that does authentication using http header field with base64 encoded credentials