add login function in ios