Change js functions to allow facebook callbacks