Port api authentication test from cucumber to rails integration

This is the first pull request for porting the existing cucumber features to rails integration tests. This is being done because:

- the extra cucumber overhead is a drag on feature development
- non-technical users don't read the existing feature specs (which defeats the purpose of having features written in Gherkin)
- the existing tests are written as scripts (click here, do that), which further reduces readability

If we're happy with the patterns laid out in this change, they will be applied to the remaining features.