refreshing main window after login