Merge pull request #173 from askeing/v2.0

Add mutex for auth() and doflash() for flash_pvt, and modify the focus rules.