corrected logic for non-registered valid email & cleaned up php indentation