added errorwin and passwdwin
added function to read password
small changes