fixed some crashes when you are not logged in