validation func works; still need to fix login func