added signup functionality with flash error messages