Cleaned up db queries and set proper token checks.