Adds ability to specify a timeout-handler fn

This gives users the ability to specify a `timeout-handler` fn instead of a `timeout-response`, which is called with the original request in case of a timeout. This would let you implement things like redirecting to the original URL after login.