add some js to control auth