fix auth forms, enable csrf middleware, add end date adjustment