refactored header buttons and data-ajax
reverting the if ct_user data-ajax code.