Is it OK to use modal dialog for Login and sign up? Or should i always use a separate url.com/login and url.com/signup?
I like having login and registration appear in a modal-style popup over the current page in most cases. I usually think in terms of the user's tasks. By popping these things in a modal, you're introducing a sub-task, while the primary task remains in the background. I think of this kind of sub-task as an interruption, and a popup keeps the primary task visible in the background.
And I completely agree with @Evil_Closet_Monkey and @DasBeast.
You should always have a separate page. You can also have a dialog, or popup, or whatever, but you should always have a separate page too.
Many sites offer fancy login popovers or dialogs, which get you in the system just fine. But if a browser doesn't support that method or something else is just causing it not to work, you're no longer allowing the user to log in at all. The page should always be coded to fall back to a separate page that allows the user to just simply log in.