corrected flaw for login