Move login into test setup. Remove redundant code