[3.3.x] local network: fix connecting to shares with a login on iOS < 15 phones
In fact, the login view controller is never dismissed on the phone form factor so the completion handler responsible to connect to the server is never executed. On iOS 15, this seems to be magically mitigated by the OS runtime, but on earlier releases it prevents the connection.
This is a regression of fae06097 and fixes #1311 (closed).
(cherry picked from commit e4521d5e, backport of !656 (merged))