added sessions and authentication