AJAX client for login2-rest