as @sashakruglov suggested I think it should be better to get the username value displayed on the page, rather then from the credentials file.