add json and modify login form