Login improvements - reuse more Django code, support reauthentication