added a network check, and account selection check in mainactivity