Improve login test suite by using more idiomatic Ruby