Add Facebook connectivity, and various fixes