it may look repetitive but abstracting it out will obscure some of the testing steps. You need to be able to see the username and password in certain tests. Also, not sure if two lines is worth it.