Fixed crash with some SSL servers. Added support of Django custom user model.