new user input validation and fixed login