Updated login validation