add methods for getting and setting cookies in handler.py for convenience and readability