Fixed the null exception issue when user is not signed in.