fixed sessions logout error and made it work