changed login button offline alert logic