Token before cookie and path fix
Token is now evaluated before cookie
Fixed syntax error when getting path for deleting expired session