Automatically show login dialog when session expires
Previously it just gave an unhelpful error message; now it pops up the login dialog again. Also, the duplicated accounts bug should be fixed!