That's because when you load a script if no player is specified then it loads stuff on whoever loaded the script. So when you're in custom game you are the host but whenever you host a dedicated server the host is the server, not you so the server has the menu but since he cannot use it you have to do that.
Note that playing a custom game is way easier if you're just trying to play with friends