further refactoring

improved readability and also introduced email syntax verification for
signup process