Complete the function of login of admin