if internet_connected():
if getusername() != None: #Returns None if username is not set
if getpassword != None: #Retruns None if password is not set
login(getusername(), getpassword())
else:
raise Exception("Password is not set")
else:
raise Exception("Username is not set")
else:
raise Exception("Internet is not connected")