Friends authentication implemented; offline keys improved