Handle nulls better in model
Don't a) close the dialog immediately when trying to sign in b) throw an exception if the dialog has been closed when we get a response