Use base64 encode instead string.encode('base64') in test_auth.py (avoid tailing newline)