Added flash_class hash to allow correct setting of class
Amended with correct terminology
Added authentication code