Nice work on the automatically generated code for the login component -
If you name your page login.aspx and put a login control on the page, it seems theres a namespace problem and the code casts to a (Login) control, which really casts to your page class - hence the problem, because it's expecting a Login control instead. Solution is to rename your page class.
1. Rename your page to AccessLogin.aspx for example
2. Rename (right click on it and select refactore-rename for best results) your class in your code behind from Login to AccessLogin
3. Update your "Inherits" tag on your .aspx page from Inherits="Login" to Inherits="AccessLogin"
That should do it.