Remove much duplicated code in test
switch conditional to a guard
Refactor auth logic

It was difficult to follow through the logic in preHandle,
since the authorized() method was hiding both whether
auth was required, and whether the user was present.
Splitting out as I've done makes it easier to follow.
I hope.
Don't assume a user is present
Merge pull request #58 from atlasapi/oauth-tidy-up

Oauth tidy up