Added another overload to accept the proxy object, also added logouts, because that's nice.