implementing AJAX for login & signup