Fork detection

added fork detection, server now needs 2 nodes or use public api