fix error when user is not logged in
fix error when user is not logged in

Change-Id: I1437a8cc2b3f36d5d74758afe2223748e179a5a6
Reviewed-on: https://gerrit.instructure.com/2503
Reviewed-by: Brian Palmer <3cb4e1df5ec4da2c7c4af7c52cec8cf340a55a10@instructure.com>
Tested-by: Hudson <dfb64870173313a9a7b56f814c8e3b33e268497a@instructure.com>

AndranikMarkosyan/lms,samuels410/greatlakes-lms,kyroskoh/canvas-lms,landonwilkins/canvas-lms,rup/Tarrax,jay3126/canvas-lms,kyroskoh/canvas-lms,roxolan/canvas-lms,instructure/canvas-lms,grahamb/canvas-lms,HotChalk/canvas-lms,venturehive/canvas-lms,shidao-fm/canvas-lms,ottenhoff/canvas-lms,ShreniiNepal/shrenii_lmp,arrivu/hiring-site,fronteerio/canvas-lms,usmschuck/canvas,usmschuck/canvas,gbleydon/canvas-lms,matematikk-mooc/canvas-lms,redconfetti/canvas-lms,SwinburneOnline/canvas-lms,Rvor/canvas-lms,va7map/canvas-lms,wrdsb/canvas-lms,arrivu/jigsaw-lms,sdeleon28/canvas-lms,ottenhoff/canvas-lms,wye0220/shindig-canvas,arrivu/arrivu-lms,SwinburneOnline/canvas-lms,SwinburneOnline/canvas-lms,roxolan/canvas-lms,leftplusrightllc/canvas-lms,juoni/canvas-lms,antoniuslin/canvas-lms,HotChalk/canvas-lms,icelab/canvas,utkarshx/canvas-lms,juoni/canvas-lms,landonwilkins/canvas-lms,jay3126/canvas-lms,nditech/red-innovadores-lms,djbender/canvas-lms,landonwilkins/canvas-lms,efrj/canvas-lms,snehakachroo1/LSI_replica,em2/canvas-lms,HotChalk/canvas-lms,arrivu/arrivu-lms,faraazkhan/canvas,tgroshon/canvas-lms,skmezanul/canvas-lms,utkarshx/canvas-lms,djbender/canvas-lms,arrivu/arrivu-lms,efrj/canvas-lms,efrj/canvas-lms,Unow/ins,juoni/canvas-lms,venturehive/canvas-lms,arrivu/qibla-ecampus,whalejasmine/canvas-lms,Jyaasa/canvas-lms,skmezanul/canvas-lms,kyroskoh/canvas-lms,ankithbti/canvas_lms,eCNAP/CANVAS,nditech/red-innovadores-lms,greyhwndz/canvas-lms,merichar/canvas-lms,wye0220/shindig-canvas,arrivu/qibla-ecampus,samuels410/greatlakes-lms,Unow/ins,shidao-fm/canvas-lms,fronteerio/canvas-lms,Unow/canvas-lms,Jyaasa/canvas-lms,arrivu/qibla-ecampus,loganrun/pincan,faraazkhan/canvas,sli7246/canvas_branch,ottenhoff/canvas-lms,fronteerio/canvas-lms,ShreniiNepal/shrenii_lmp,Jyaasa/canvas-lms,grahamb/canvas-lms,arrivu/hoodemo,wimemx/Canvas,eCNAP/CANVAS,AndranikMarkosyan/lms,samuels410/greatlakes-lms,Unow/canvas-lms,rup/Tarrax,Unow/ins,parbros/red-innovadores-lms,Jyaasa/canvas-lms,narigone/canvas,shidao-fm/canvas-lms,whalejasmine/canvas-lms,shidao-fm/canvas-lms,arrivu/jigsaw-lms,instructure/canvas-lms,tgroshon/canvas-lms,utkarshx/canvas-lms,venturehive/canvas-lms,eCNAP/CANVAS,dgynn/canvas-lms,greyhwndz/canvas-lms,matematikk-mooc/canvas-lms,sfu/canvas-lms,SwinburneOnline/canvas-lms,landonwilkins/canvas-lms,va7map/canvas-lms,nditech/red-innovadores-lms,merichar/canvas-lms,juoni/canvas-lms,jay3126/canvas-lms,tgroshon/canvas-lms,sdeleon28/canvas-lms,leftplusrightllc/canvas-lms,dgynn/canvas-lms,snehakachroo1/LSI_replica,kyroskoh/canvas-lms,sdeleon28/canvas-lms,grahamb/canvas-lms,narigone/canvas,wrdsb/canvas-lms,va7map/canvas-lms,parbros/red-innovadores-lms,sfu/canvas-lms,roxolan/canvas-lms,redconfetti/canvas-lms,usmschuck/canvas,rup/Tarrax,dgynn/canvas-lms,redconfetti/canvas-lms,arrivu/hoodemo,usmschuck/canvas,wrdsb/canvas-lms,icelab/canvas,em2/canvas-lms,ankithbti/canvas_lms,va7map/canvas-lms,snehakachroo1/LSI_replica,venturehive/canvas-lms,instructure/canvas-lms,antoniuslin/canvas-lms,greyhwndz/canvas-lms,arrivu/hiring-site,AndranikMarkosyan/lms,dgynn/canvas-lms,skmezanul/canvas-lms,em2/canvas-lms,instructure/canvas-lms,gbleydon/canvas-lms,sfu/canvas-lms,Rvor/canvas-lms,grahamb/canvas-lms,roxolan/canvas-lms,eCNAP/CANVAS,Rvor/canvas-lms,efrj/canvas-lms,matematikk-mooc/canvas-lms,sli7246/canvas_branch,gbleydon/canvas-lms,Unow/canvas-lms,tgroshon/canvas-lms,samuels410/greatlakes-lms,leftplusrightllc/canvas-lms,merichar/canvas-lms,ShreniiNepal/shrenii_lmp,redconfetti/canvas-lms,sfu/canvas-lms,arrivu/hiring-site,djbender/canvas-lms,ankithbti/canvas_lms,arrivu/hoodemo,sfu/canvas-lms,icelab/canvas,instructure/canvas-lms,narigone/canvas,antoniuslin/canvas-lms,fronteerio/canvas-lms,instructure/canvas-lms,utkarshx/canvas-lms,wye0220/shindig-canvas,whalejasmine/canvas-lms,wimemx/Canvas,sfu/canvas-lms,sli7246/canvas_branch,jay3126/canvas-lms,skmezanul/canvas-lms,wimemx/Canvas,matematikk-mooc/canvas-lms,Rvor/canvas-lms,AndranikMarkosyan/lms,grahamb/canvas-lms,nditech/red-innovadores-lms,sdeleon28/canvas-lms,whalejasmine/canvas-lms,parbros/red-innovadores-lms,faraazkhan/canvas,greyhwndz/canvas-lms,narigone/canvas,djbender/canvas-lms,loganrun/pincan,ShreniiNepal/shrenii_lmp,antoniuslin/canvas-lms,loganrun/pincan,arrivu/jigsaw-lms,wrdsb/canvas-lms,HotChalk/canvas-lms,leftplusrightllc/canvas-lms,instructure/canvas-lms,sfu/canvas-lms,snehakachroo1/LSI_replica