Minor refactoring of related find posts function calls

Also, partially removed login hack.  Fixed jshint errors