Corrected bug that caused fatal error if user was not logged in.