updated admin login functions