fix resources use in driver
store sent messages
send pending message when online resumes
add timestamp to messages