Fixed a bug that occured when not logged in.