Fixed 404 error if s is null in case the user is not logged in