I don't know of a way to display system errors in a template tag.
But you can use the Custom System Messages addon to move system messages into a template. This gives you more control over customizing the errors.
If you have JS skills, there's no reason you shouldn't be able to submit your login form using Ajax and show an appropriate error on the screen. You'd write a conditional based on the action ID ({action}
) in the template to handle login errors in a specific manner and all other errors regularly.
This extension lets you define any 2 templates within your template groups to be used as the error page. You have access to all the usual variables from the Specialty Templates, plus two new ones {referrer} and {action}.