Problem/Motivation As described in https://stackoverflow.com/questions/7131909/facebook-callback-appends-to-return-url/41917323#41917323 Facebook adds fragment #_=_ to the redirect_uri to prevent potential security issues. In addition to being strange for users, this causes js error in various scripts which use the window.location.hash incorrectly in jQuery selectors. Example issue [#2492993]. Proposed resolution Set a different fragment when generating the redirect url after login.