Change code to retry reading from TeamCity REST interface when a login page is received.