complete admin login function