Close on successful login, tidyups