Fix referer issues for retry login
update genfile