fixes in recognition and sessions

now the variable that queries to create a newly detected user is
correctly reseted