I have posted it on these forums before-COUNTER OFFERS ARE POISON, whether using a job offer as a blackmail tool at your current employer or giving your notice and then getting an unsolicited counter from your boss. In the first instance you are potentially burning two bridges. If your current employer counters you will always be marked as a traitor. When you go back to company #2 and tell them "Thanks but on thanks" they will most likely (correctly) suspect that you are simply using their offer to extort more money out of your current employer and you will go on their black list as well. In the second scenario your quitting has caught your manager off guard and having to replace you will mean more headaches for him having to find a new employee and figure out how to pick up the slack of the work you are leaving behind. A counter offer is nothing more than a way to get rid of you on the companys terms. Even if I may sound a bit paranoid and this doesn't happen to you, remember what I said before-you still have the stigma of being labeled a traitor. People will remember this for years, and while it may seem like nothing bad happened to you, five years down the line you could be passed over for that big promotion because one of the decision makers remembers the time you threatened to quit if you didn't get a raise.
Another bit of advice I will give you is that not being paid enough or not being able to pay your bills are NOT vaild reasons to ask for a raise. If you want more money you need to be able to justify your value to your employer. After only one month at a job, it would take a big set of brass balls to threaten your employer to leave if they don't counter your other offer. I can almost guarantee that in one month on the job you haven't done anything to justify to your new employer giving you a raise of over 17%. At this point their investment in you is minimal so you have absolutely no bargaining power.
If job #2 is what you want, accept the offer, give your current employer two weeks notice, and leave on the best terms possible.
Finally, money isn't everything and a well paying job you hate isn't worth it. I learned this lesson the hard way. At my last job I was about 20K a year under paid based on research I had done. I liked the work and it was a pretty relaxed environment where working over 40 hours a week was rare and on occasions I was able to duck out early on Friday afternoon to go fishing. I make quite a bit more now but I have to earn every penny of it and then some. I really no longer have any concept of what an 8 hour day is. I am routinely working 50+ hours a week, sometimes for months at a clip. I have even put in a few 16 hour days. Working 7 days a week is also not out of the question, especially since I am tethered to my company laptop. I have even had to work from home on vacation days. Speaking of vacation, if I need to take time off I usually have to work 12+ hours a day to wrap things up before I go, or work 12+ hours a day to catch up when I get back. I spent the majority of this past summer traveling for work. Let me tell you, this stuff gets old quick and some days I seriously think I would take a job offer for $20K less than I am making now if the potential employer could guarantee that I would never have to work more than 40 hours a week. So if you feel that company #2 is better work with more opportunities for career advancement or more stability, go for it. The 16% raise should just be gravy.