Added sessions and cookies handling.