added flash for incorrect values and encrypted cookies