use Reponse instead of abort; clean up method

Use bottle hooks to close the IMAP session (if any).