some custom code for login controller for internet reachability
implementing single file for both iphone and ipad