A sample login/register form using javascript and php