title: type mismatch; found : Some[String] required: play.api.templates.Html
body: <p>I am new to scala as well as Java Play. I was looking at a code which looks like this but I am getting the above error. I am unable to fix this despite adding the curly braces etc. Any help is much appreciated.
  Sorry I forgot to mention that the error shows up in @main. Even as I replace Some(username) with @main(username) there is no respite. routes this is how the relevant code looks</p>
  
  <p>conf/routes</p>
  
  <pre><code>GET     /Login                controllers.Application.Login(username:String)
  </code></pre>
  
  <p>app/view/Login.scala.html looks like this</p>
  
  <pre><code>@(username: String)(implicit request: RequestHeader)
  
  @main(Some(username)) {
  
  &lt;div class="page-header"&gt;
      &lt;h1&gt;Login &lt;small&gt;You are Logging in as @username&lt;/small&gt;&lt;/h1&gt;
  &lt;/div&gt;
  
  &lt;div id="onError" class="alert-message error"&gt;
      &lt;p&gt;
          &lt;strong&gt;Oops!&lt;/strong&gt; &lt;span&gt;&lt;/span&gt;
      &lt;/p&gt;
  &lt;/div&gt;
  
  &lt;script type="text/javascript" charset="utf-8"&gt;
  
      $(function() {
  
          var WS = window['MozWebSocket'] ? MozWebSocket : WebSocket
          var loginSocket = new WS("@routes.Application.UserLogin(username).webSocketURL()")
  
          var receiveEvent = function(event) {
              var data = JSON.parse(event.data)
  
              // Handle errors
              if(data.error) {
                  loginSocket.close()
                  $("#onError span").text(data.error)
                  $("#onError").show()
                  return
              } else {
                  $("#onChat").show()
              }
  
  
          }
  
      })
  
  &lt;/script&gt;
  }
  </code></pre>