Save and load connection cookies on application showed and hidden.