sorting of users on frontend side

https://gist.github.com/magul/3acebb82db3a03f8fba8