Fixed search bug where session identifiers were not checked before searching