added javascript for viewing pics and devise
fixed index and search functionality, added cancan and rolify