refactored setting of username: use QInputDialog instead of own implementation