create separate function for facebook authentication