checking for logged in user in all routes