add logout logic