Added some more user functionality, need to add in following still. Having long query issues when joining user_log (http://explain.depesz.com/s/pI5)