Proper way to invalidate session

Proper way to invalidate session