Expected behaviour, no?
The connection string specifies ServerName and FailoverPartner. So the app tries ServerName first, then FailoverPartner if unsuccessful.
The login errors you're seeing are the attempts of your app to connect to ServerName, which fail as it's the mirror and the database are unavailable. The connection then tries FailoverPartner and is successful.