Fixed a bug when user is not logged in.

Signed-off-by: crynobone <crynobone@gmail.com>