Move password hashing in handler
diff --git a/core/kg/api/rest/handler.go b/core/kg/api/rest/handler.go
index dbc5882..88d0670 100644
--- a/core/kg/api/rest/handler.go
+++ b/core/kg/api/rest/handler.go
@@ -23,9 +23,7 @@
 		return err
 	}
 
-	if statusCode != http.StatusOK {
-		w.WriteHeader(statusCode)
-	}
+	w.WriteHeader(statusCode)
 
 	encoder := json.NewEncoder(w)
 	encoder.SetEscapeHTML(true)
@@ -35,9 +33,5 @@
 		return err
 	}
 
-	if f, ok := w.(http.Flusher); ok {
-		f.Flush()
-	}
-
 	return nil
 }