oauth: refactor application form