support Ajax login/logout