Resolve issue where logging out and then logging back in was not initializing the device. This needs to happen, since the device cannot store data in memory. Also updating some cases where the image of a message was not being passed with the image record