Fix js for unauthorized users.