Department selection and glyphicons working
Fixed database functions for:
-getting a single ticket
-getting multiple tickets
-accepting and factoring in search/filtering parameters (uses async.js for concurrency prior to fetching tickets)
-getting the list of user-departments

The ticket page is now populated with information for the specific ticket. However the page needs to be heavily modified for presentation.
-login authentication now works
-database searches for user, authenticates the password, sends back the user role and list of departments
-the "Admin" role has automatic access to all departments, so session dept = null (no access to any depts would be session dept = 'none' instead)
-upon failed login, the index is loaded again with an error message
-fixed a bug with login in that a user with an invalid role will not return with a callback (returns the appropriate error message as well)
-permissions.js now also checks if user is logged in
-ticketParams did not reset the search and filter parameters in some cases (such as user refreshing page). this has been fixed now
-ensured that users only see tickets that pertain to them
-fixed a bug with the getTickets database function in which the "assigned_to" and "altered_by" fields were accidentally swapped
-fixed a bug in the database function for searching tickets in which multiple departments could not be a parameter
-so if a user has multiple departments assigned, the session dept will be stringified and passed in, converted to an array of ids and the query will search based on multiple departments
-searching for a single department still works under this construction
-fixed the drop-down box on the new ticket page, which didn't work before
Half-merge with deptDesign (admin-module untouched).
Merge remote-tracking branch 'remotes/origin/deptDesign'

Conflicts:
	public/javascripts/admin-module.js
	public/stylesheets/style.css

(merged admin-module.js)
-fixed bug with searching database function where the "OR" in the query caused the filters to be problematic. in other words, searching for tickets is 90% working now (with the other 10% being yet-to-be-discovered errors)
--department links on the left panel are functional, and display the tickets from the correct department
Merge branch 'database'

Conflicts:
	lib/database.js
	lib/ticket_server.js
Merged with database branch.
WORKING:
-creating new tickets
-creating new users

BUGS:
-displaying "newly created" tickets in view tickets causes duplicates to show. This was meant to be part of the "live" implementation, where new tickets would be added to the list automatically. I'll fix this soon

NOT YET WORKING:
-viewing users
-creating depts assumed unfinished. will merge again later when it is
Updated authentication function in app.js so that passwords are automatically converted to md5.

Also in postgresql users table, updated each password to their md5 versions.
Viewing users now works.
Fixed the bug where new tickets would be displayed even to the original creator, causing duplicates.
Untested with multiple (other) clients.
-fixed the display of view/delete links on the viewticket pages based on role.
-added helpful text beneath department input field in ticket creation form, letting user know that they can enter multiple departments
-created new table: comments_archive, which stores comments but for archived tickets
-user can now delete tickets. deleting a ticket will also remove all corresponding entries from the comments tables
-a modal pops up asking for confirmation. if yes, the page reloads after half-a-second else a bug will cause the scrollbars to disappear
-made a small change so that all departments display in panel when role is admin
-deleting departments is now functional. works the same way as deleting tickets, except the department links on the left side panel are also updated accordingly
-fixed a bug where if a department existed but had no managers, it wouldn't display on the view departments page
-deleting users now works. removes the appropriate fields in tickets (assigned_to or altered_by) and entries in the user_dept table as appropriate
-adjusted width of first td cell in viewusers
-admin can now change user's name and role
-editing is performed inline, and changes are stored in the database upon edit, then page refreshes