updates login validation to check for errors in validator
separates public and private parts of project