Adding new refresh functionality

As described in #211 the refresh is not working if the HTTP session
refresh isn’t working, so need to save login data encrypted and try a
new login…
Improve email mock

see #230