Added base64 encoding to HTML response