checks session for logged in users