Transformed loginPage into Class

in order to abide by the rulez