title: How to display an error message upon invalid login and route back to username and password screen in ruby sinatra
body: <p>What I want to do is to be able to put an error message of my choosing if username/password combo is wrong I can just make another view but want to be able to just go back to login screen instead if having to go to a invalid login view I know there has to be something simple I can add on next line after :login but when i put "This is a sample error message" or something like that it just will display it and not bring me back to login screen.</p>
  
  <pre><code>post '/login' do
      authenticate
      if @auth == 1
          erb :main
      else 
          erb :login
      end
  end
  </code></pre>