altered server to work on base64 rather than plain text