Externalized API call logic
Implemented name change check upon login