private void login() {
        
        if(!loginPanel.isFillField()) {
            loginPanel.setErrorInfo("Fill all fields");
            return;
        }
        
        try {
            session = chatRoomEntry.login(loginPanel.getLogin(), loginPanel.getPassword());
        } catch(RemoteException e) {
            fatalErrorExit("Fatal error", e);
        } catch(ChatRoomLoginException e) {
            loginPanel.setErrorInfo("Login error");
            return;
        }

        nickname = loginPanel.getLogin();
        setTitle(APP_NAME + " : " + nickname);
        setContentPane(mainPanel);
        revalidate();        

        refreshChatRoomList();
    }