change the redirect from header to javascript in order to support app on facebook.com