Changed register/login window to close when successful