change loginpage logic