relize the switch between the LogIn Form and the Main Form, and Exit from the Main Form