Implement authentication

That is, make it actually work :)
Thanks!