Update the login logic to match the updates in the FB javascript library

This will no longer keep you in a redirect loop.