add logout function & block function