Clean up code.

 * Merge search route in browse handler.
 * Update basic authentication documentation strings.
 * Minor code clean up.
Refactor library item handling in JS.

 * Clean up some code duplication.
 * Merge groups, graphs and collection items handling.