Improved code of custom authentication provider cookbook article

Improved source code of the article. Empty security Token and file_put_contents errors resolved.