Fixed error with the user not being logged in and trying to use the gallery
Previously, it would try to get req.session.user.userid, so if
req.session.user was undefined, it would try to access userid of null.
Now, if req.session.user is undefined the userid used is set to null.
Merge branch 'master' of https://github.com/GlimmerLabs/MathOverImages