If you are working for an employer that will treat you badly because you are starting your own company, then it is a good thing you are leaving.
If the employer will make you sign stuff, then that's a good sign, since those papers also limit him (The most important one: He cannot claim later he was unaware of your venture). You do not want to have the employer argue that the start up is really his because you (allegedly) created that on company time. You want to limit the possibility of that argument being made.
A true can of worms is opened when you start up your own company and then your old company sues you after you have left, potentially claiming ownership of your new company's assets (source code, intellectual property, etc...).
What you lose is just part of the cost of starting your own company. I have noticed that the smaller the company you work for, the larger the consequences, intentional or subconscious (your boss treats you bad or does not take you into consideration after he/she learns of your intention to start a new company).
As to how to limit the possibilities of being sued later, make sure you keep everything separate. Everything. Do not use your employer's equipment for ANYTHING regarding your new company. Above all: Do not use your time at the job for anything to do with your new company. Give back the company laptop. Give back the cellphone if you have one. Anything that might let your employer claim that you used his resources to start your company.