FIXED: login and upload
CHANGED: now checking any kind of internet connection