Fixed bug causing infinite redirects & some py3 related issues.

The permissions response looks like this: [{'permission': 'public_profile', 'status': 'granted'}, {'permission': 'email', 'status': 'granted'},...]
 so I rewrote that piece of code since it's always returning an empty dict.