removed duplicate step def, changed case statement to if/else in login_as_user function
rubocop fixes