added login error conditionally for index.html