Updated to get email and device Id for connecting to server