Refactored the verification process to include the user in the db
because we cannot rely on the session. Also simplified the code.