Why not just call the dispose() method on the LoginGUI if login/LogOut is successful?

--- Update ---

...That is if the LoginGUI extends a JFrame.