put back the js dependencies where they should have stayed

When I began using bower, it installed everything in bower_components.
But now that I know how to change this default behavior, all is nicely
put inside js/ folder :)
remove unused certificate
removed custom themes
add logs to database

Things can now be logged to the database with the dblog() function.
fix missing team_id in $_SESSION on reset pass and common.php.

Also, the menu is removed when no one is logged in.
Merge branch 'next'

* next:
  fix missing team_id in $_SESSION on reset pass and common.php.
  add logs to database
  removed custom themes
  remove unused certificate
  put back the js dependencies where they should have stayed