The Coast Guard prior to 9/11 and the formation of DHS was under the Treasury Department in peacetime, and under the Navy in wartime. It should be under the Pentagon as a separate service. That is where it would serve best and be properly supported.
During conflicts, the Coastguard performed all of the functions of the TSA, but with disciplined military personnel instead of mall cops.