fix bugs in new_for_logged_in_user