facebook login refactored