fixing reopen bug with authentication window