Improve login test suite by using more idiomatic Ruby

Rubocop detected a handful of offenses in this file. I corrected those and made the test steps more clear so the reason for failure would be more obvious when running the test suite.