added close on login