fix sample and add link to full documentation
check server certificate, better 404 handling