The membrane microenvironment regulates the sequential attachment of bacteria to host cells