@ -418,7 +418,7 @@ module.exports.server = server;
async.each(routes.concat(loginRequired), function(route, next) {
app.get('/' + route, function (req, res) {
if ((route === 'login' || route === 'register') && (req.user && req.user.uid > 0)) {
if (loginRequired.indexOf(route) !== -1 && (req.user && req.user.uid > 0)) {
user.getUserField(req.user.uid, 'userslug', function (err, userslug) {
res.redirect('/user/' + userslug);