Server side authentication works!

Preliminary PR. Please comment heavily, as I don't think it's ready for merge quite yet.

I had to move around some functions to fix the circular imports.
Also, modified authentication decorator to account for permissions.
Finally, updated tests to reflect the changes.

NOTE: I had to do add in some dummy testing code into the `requires_authenticated_user` function as I'm not sure of the best way of doing this. Perhaps @moowiz could help out? :)

Fixes #47 
It's used as part of the OAuth. I'm not exactly sure how to actually keep it secret though. From what I've read, there's no 100% way of keeping it away from clients.