Fixed the "search for users and add to shifts"-functionality

Also rewrote a lot of javascript