Should this;
myMasterpage m = (myMasterpage)this.Master;
not be;
MasterPage m = (MasterPage)this.Master;
I just tried it and it does what you want if you make the change.
However, if you then Click Button1, it becomes disabled again.
Everytime the page is reloaded/posted back to the server, the button will be disabled again, to prevent this on a postback to the following in the master page load
if (!this.IsPostBack)
{
Button1.Enabled = false;
}
What you also should consider doing, is store the logged in state in the session etc. and also only conditionally set the button based on this logged in state.