You are using two global variable:username and password
check whether in page load you are assigning them to blank or not.
if yes then you should not do that or do like below. you should have knowledge about asp.net page life cycle.
if(!IsPostbask)
{
username="";
password="";
}
because without this if you will try to assign variables then every time on post back they will get reassign to black.
i think it will help you.