Bugfix for secondary auth (AJAX)