Fixes issue with unable to open second dialog on wrong room key entered. Still tests to come. Handle dialog action after the dialog is closed, otherwise the event for wrong key can come before the dialog is closed and will not be open again.