Implement access control

This gist fairly well explains the idea: https://gist.github.com/brianloveswords/598ae13da64718c6a605

Oh man this is so much more reasonable with #25 merged in. @andrewhayward care to take a look at this when you get a chance?