Ok, for starters, you need a heater, they are tropical fish and need a minimum temperature of 76. That will help.
Second, you need to be changing the water about 3 water changes a week for a tank that size. Fish naturally produce ammonia in their waste, and in small tanks, even with a filter, ammonia builds up very quickly and can cause all sorts of problems. Here is a helpful link: http://www.bettafish.com/showthread.php?t=115758
Third, flakes are horrible (especially the brand you have, very, very poor quality) for Betta fish and cause constipation issues. You need to find a high quality pellet with very few fillers (wheat, soy, rye, corn, etc. - those are bad, bad, bad).