The Page_Load subroutine runs EVERY time the page is loaded. You can write your login logic inside your Login Button Click Event
The code written inside
block is executed only once when page is loaded for the first time.
Anyway, you can take a look at How to skip calling Page_Load event