reformat code, optimize imports, token controller - captcha check added