add login function
register login logout