add verify_code function to user

you can probably only include the sql creation on the if statement, so you don't need to replicate the return and the execute_fetchone code