Fixed AJAX and Authentication Issues