add logout and authenticate