There is no condition inside “nothing_register_menus”. It executes first is_user_logged_in();
and then the filter. No matter what.
It seems that it should execute the filter IFF is_user_logged_in is TRUE.
Also maybe consider a redirection to home page after log in that might trigger it, or some other AJAX workaround.
^^