Refactored load user js and fixed a bug where a query was executed several times.