add login & addAuthKey functions.