added predispatch login check