index checks for user session