Improved & Fixed Undefined index message when logout