Added $login_required check
Trying this for masthead dynamicisity