added rudimentary validation checks to login logic