Fixed handling of edge cases with facebook login