fixed bug on login reopening