php validation on login and registration, closes #33