Added encryption to cookies and setup flash notices