testing out api calls and reidrecting to login if we are not logged in