added flash messages, user roles, encryption