check email lengths before querying database
rewrite request_valid_token from require_valid_token