The real problem may be in a DSL modem and/or setup. For example, I've seen this a lot with people using 2Wire brand modems.
But the general task is a common one. The following is a generic Greasemonkey script that will work -- but you will have to tweak it slightly because enough of the login page was not provided.
Ideally, save the entire login page, strip out any IP addresses or passwords and then paste it here or at Pastebin.com. Then we can give a more exact solution.
Script:
// ==UserScript==
// @name Generic Auto Relogin
// @namespace GenericLocal
// @description Just removes a login annoyance. WARNING: This compromises security!
// @include *
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js
// ==/UserScript==
$(document).ready(Greasemonkey_main);
/*--- WARNING! Username and password!!!
*/
var sGbl_Username = 'For demonstration purposes only!';
var sGbl_Password = 'Hopefully you know that this is a bad idea';
function Greasemonkey_main ()
{
//--- Is this a login screen? ---
var zLoginForm = $("input#btnSubmit");
if (zLoginForm && zLoginForm.length)
{
//--- Set username and password. ---
$("input#username").attr ('value', sGbl_Username);
$("input#password").attr ('value', sGbl_Password);
//--- Submit the login form.
$("input#btnSubmit")[0].click (); //-- Click submit button.
}