some questions

Hi all.
I am a newbie for Vaadin and for WEB development also.
Can you help me to solve some problems/questions in my new Vaadin application.

(1) I want to write LoginWindow, but in most examples LoginWindow written using
removeWindow(…) & setMainWindow(…) APIs, is there any other way to do this?

(2) I wrote Login mechanism as in Paymate-application, but when
(a) I close all tabs in browser related to application, and reopen application I didn’t see LoginWindow,
(b) I close all tabs related to app. and browser also, after this I opened application it shows me LoginWindow
(c) I didn’t close tabs related to app. but closed browser. when I opened browser it didn’t show me LoginWindow
What should I do if I want to show LoginWindow in all these cases, if I should use another technology please give little example
how to do it.

(3) I have a 2 applications in one WAR, and I want to open second application from first how can I do this?

(4) Last one is, How can I protect my deployed WEB application from copying.

As I said before, I’m a really beginner for WEB development and if it is possible
can you give some links to explain your solutions.

Thanks for your answers and advises.