Support for offline mode when auth server unreachable

Edit: Squashed into one commit