worked on AJAX login