Added Background Timeout.
Fixed cases where wallet was re-entered after exit.