fixed a bug in the base64 hanlding that led to auth failures for some