Fixed databse connection bug.
Merge branch 'dev' of https://github.com/stevenhillcox/Grad-Project-2014 into dev