WordPress ajax sign in

After spending 3-4 hours searching for a solution, getting very close to installing a plugin I stumbled upon ajax hooks in wordpress, which totally saved my day.

I mean, it shouldn’t be necessary to install a plugin in to make it possible for your users to sign in right?

I put the necessary files on github: https://gist.github.com/2229969