better user validation
changed to render page on database callback