Entire code now handles badLogin and unvalidated better.