Facebook Login not working in Web-app mode iOS

FB login works great on All browsers/platforms we have tested, besides when in Web-app mode on iOS - in WebApp mode, a Facebook error page is displayed after clicking FB login (attached ScreenShot). We are using Blogs MU theme. Site is http://EpilepsyU.com. What is extra strange is that Register with FB is working in Web-App mode. I have used this code to keep the site in web-app mode when clicking internal links:

<script>(function(a,b,c){if(c in b&&b[c]){var d,e=a.location,f=/^(a|html)$/i;a.addEventListener(&quot;click&quot;,function(a){d=a.target;while(!f.test(d.nodeName))d=d.parentNode;&quot;href&quot;in d&&(d.href.indexOf(&quot;http&quot;)||~d.href.indexOf(e.host))&&(a.preventDefault(),e.href=d.href)},!1)}})(document,window.navigator,&quot;standalone&quot;)</script>.

Without this code, the login link opens in Safari, and then logs in user in Safari, but user cannot go back to Web App and be logged in. User is again asked to login and is again directed back to Safari. So, there is no way for a user to login with Facebook in Web app mode, with or without the code that keeps them in Web app mode when clicking internal links.

This is important to us as we want our users to install the web-app on their iOS devices and we are also packaging the web-app for App store and Android Play.

Code for forcing internal links to open in WebApp was found here: http://stackoverflow.com/questions/2898740/iphone-safari-web-app-opens-links-in-new-window (Answer 16)