move facebook login into own js file