title: Spring 4 STOMP over Websockets- How to setup login and passcode properly
body: <p>I'm playing around with Spring 4 Stomp over Websockets. Now I'm trying to put login and password in my configuration.   </p>
  
  <pre><code>@Override
      public void configureMessageBroker(MessageBrokerRegistry registry) {
          //registry.enableSimpleBroker("/queue/", "/topic/");
          //Enable MQ
          StompBrokerRelayRegistration relay=registry.enableStompBrokerRelay("/queue/", "/topic/");
          relay.setSystemLogin("login");
          relay.setSystemPasscode("passcode");
          //relay.setClientLogin("login");
          //relay.setClientPasscode("passcode");
          registry.setApplicationDestinationPrefixes("/app");
  
      }
  </code></pre>
  
  <p>But then when I try to connect with different login and passcode, I can still connect. Here's my javascript.</p>
  
  <pre><code>$scope.initSockets = function() {
          $scope.socket.client = new SockJS('/Html5GameApp');
          $scope.socket.stomp = Stomp.over($scope.socket.client);
          $scope.socket.stomp.connect("sample","sample",function(frame) {
          console.log('Connected: ' + frame);
          $scope.socket.stomp.subscribe("/queue/stomp.data", $scope.liveGameData);
          });
          $scope.socket.client.onclose = $scope.reconnect;    
      };
  </code></pre>
  
  <p>Am I doing wrong with my configuration?How will I setup it properly.Thanks</p>