set queries to active record
Variable & auth fixes
fixes