Device Connection Check/Login System Working

Made changes for both of these to make sure devices are connected and
that login system works.