There isn't a single way of solving this (like most problems)
Have a public method on your main window which accepts a username and password?
Or perhaps the login form could be given a structure which it fills in and returns.
Or you could use a singleton which contains such information and everyone accesses.
Bookmarks