retrofitting of the code

files updated to integrate with the db
Search functionality corrected

search functionality corrected
Merge branch 'master' of https://github.com/payamrastogi/social