fix after+sign_in redirect for javascript