Piwik's tracking code isn't compatible to Silverstripe's default theme. Javascript can't modify a xml document using "document.write()" function. Instead you have to modify the DOM directly. See an example...
There may be cases where you want to authenticate against a hash generated in PHP and stored in MySQL. It becomes unhandy if the hash is salted. This example shows how to authenticate against {SSHA256} (read: salted SHA2 with length of 256) using SQL only.