diff --git a/addon/www/index.html b/addon/www/index.html
index 713c66a..7c4617a 100644
--- a/addon/www/index.html
+++ b/addon/www/index.html
@@ -944,7 +944,7 @@ along with this program. If not, see .
var password = $(event.currentTarget).form('get value', 'password');
rest("POST", "/login", {"username": username, "password": password},
function(data) {
- window.location.href = window.location.href.replace(/\?.*/, '?sid=@' + data + '@');
+ window.location.href = window.location.href.replace(/\?.*/, '') + '?sid=@' + data + '@';
},
function(xhr, ajaxOptions, thrownError) {
default_error_callback(xhr, ajaxOptions, thrownError);