Add AJAX query to login