Adding FB authentication, moved old code