clean up code for 'link share'; fixed bug for 'login_require_ajax'