Error clearly lies here:
Login Login1 = (System.Web.UI.WebControls.LoginView)LoginView1.FindControl("Login1");
You are trying to cast a "Login" control into "LoginView". You can clearly see that you are trying to find a control inside 'LoginView'(child control) but then trying to cast it to parent.
Change it to:
Login Login1 = (System.Web.UI.WebControls.Login)LoginView1.FindControl("Login1");
to resolve it.