This stuff is old. Really old. Pre-OAuth-old. But some people might find some use in it. Parts of it were written by Niklas.