var System = {
	/*
	 * Attempt to login the user with the specified credentials
	 */
	login: function(email, password, on_success)
	{
		$.post('user/login', {email: email, password: password}, function(resp)
		{
			if(resp.code == 0)
			{
				if('function' == typeof on_success)
				{
					on_success();
				}
			}
			else
			{
				alert(resp.message)
			}
		}, 'json');
		
		// Prevent form submit
		return false;
	}
}

