function forum_login(username, password, url, redirect_url)
{
    document.getElementById('forum_login').innerHTML = '<form id ="forum_form" action="'+url+'" method="post"><input type="hidden" name="username" id="username" value="'+username+'" /><input type="hidden" name="password" id="password" value="'+password+'" /><input type="hidden" name="login" value="Login" /><input type="hidden" name="redirect" value="'+redirect_url+'" /></form>';
    
    document.getElementById('forum_form').submit();
}