Perhaps these next 3 lines (login, select org, go to sync plans) could become an internal method to save you from writing the same code over and over?