keep logged on between refreshes if asked to

@nicolashery this should do the trick for refreshes. Have started to add some tests for that functionality also