User pages in the admin section

I've pulled out the merge of #270 so it can be merged with the newly-added tests all in one go.

@alastairs: I'd like an opinion on some of these, as a few of them feel like I'm testing just the implementation.
Why not return the HttpStatusCode from here to save yourself the cast everywhere?