Make AJAX call to login work