Fix navTo et hasRight error in the log (reorder and clean controller js code)