updated login validation