test credentials, encode credentials