I think best option is to create your own sidebar function and use an if user is logged in statement.
https://codex.wordpress.org/Function_Reference/register_sidebar
https://codex.wordpress.org/Function_Reference/is_user_logged_in
if ( is_user_logged_in() ) {
SIDEBAR CODE HERE
} else {
SOMETHING ELSE HERE
};
Actually I think the sidebar login form is already in an if statement and you could easily add the sidebar call there