added Offline Login functionality