I'm not the expert here but until one show up this is what I'd do:
When the bike dies like that, be ready with your screwdriver and check to see if you can get fuel flowing out of the drain screw. If there is no fuel, you probably need to clean the carb.
If fuel flows freely, you might still need to clean the carb! But, it is possible that it could be an electrical problem. From the description I'd work on the fuel side first.