add login function, admin authentication