Fixed issue #10 to avoid calling cross domain JS plug-ins.

The issue was caused by calling the JS plug-ins from top domain without
www. if the visitor is signing in/out on www. domain. Due to JS cross
domain protection, the browser blocks the calls. This fix introduced a
new function to get the page URI only to avoid cross domain calls.