What i want to do is something else:
for example as soon as someone logs in i want to run a query in the db to check for specific values.
if the value is X continue to home page
if the value is Y continue to a different page.
where would be the best place to set this code?