Fixed bug that was occuring because I wasn't checking for authentication