add logout and return login result