
var storage = localStorage;//window.rohStore;

var roomName;
var requestedHistory;
var oldestMessage;

$(document).ready(function() {

	$("#password").keydown(function(e) {
		if (e.keyCode == 13) {
			$("#password").blur().focus();
			$("#loginButton").click();
			return false;
		}
	});
	
	$("#loginButton").click(function() {
		rohbot.login($("#username").val(), $("#password").val(), null);
	});
	
	$("#registerButton").click(function() {
		rohbot.register($("#username").val(), $("#password").val());
	});
	
	$("#chat").scroll(function() {
		if ($("#chat").scrollTop() == 0 && !requestedHistory) {
			rohbot.requestHistory(oldestMessage);
			requestedHistory = true;
		}
	});
	
	$(window).resize(function() {
		$("#chat").scrollTop($("#chat")[0].scrollHeight);
	});
});

@@ -337,16 +337,31 @@
 t.login(
+%7B%0A%09%09%09Username: 
 $(%22#user
@@ -365,32 +365,45 @@
 sername%22).val(),
+%0A%09%09%09Password:
  $(%22#password%22).
@@ -411,14 +411,12 @@
 al()
-, null
+%0A%09%09%7D
 );%0A%09

Update login method