main activity layout refactoring and dynamic connection status