Fixed some errors

Server logout errors, main screen minimize and login screen close
window, closes the connection to the server
continued