Created a method in LocationRepository to count the total number of locations and added a session variable that redirects the user if the total number of locations is less than 1