stat to add login function