added user to database queries to achieve better security