update permissions for ajax, if ajax timeout go to login