search: fix query string in add-to-search

* Adds double quotes around author and title value. (closes #2251)

* Splits terms by whitespace or quotes and join them
  with proper operator. (addresses #2252)

Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>
Signed-off-by: Adrian Pawel Baran <adrian.pawel.baran@cern.ch>
login: handle 401 error

* Adds template and special handling of 401 error.

Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
login: fix PEP8/257 errors

Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>