improved friends connection; offline keys implemented