Offline mode updated to retain user login status. Also updated localStorage keys.