updated 'connect to facebook' function