Fix #629

Plus more work on Facebook authentication handling