Login screen now correctly redirects to the last failed element