Fix bugs with app crashing without a user in the database