Turns out this was because the webkit driver runs the server in a different thread. One thread had the database locked, so the other thread couldn't do what it needed to do to log me in. To fix it, I stopped using transactional fixtures:
class TeamBuildingTest < ActionDispatch::IntegrationTest
self.use_transactional_fixtures = false
...
Then I used the database_cleaner gem to clean out my database. This was a case where trying to take baby steps caused me more grief rather than less (I was trying to avoid having to learn yet another gem while I was trying to learn Capybara and Javascript).
I found this link helpful alongside the database_cleaner
documentation.