[#69485852] Refactored the sinatra index route.

* Will check if a user is logged in before querying the database and checking if theyre an admin.

Signed-off-by: Gus King <gusssk@gmail.com>