changle login handling in offline mode