added whenLoggedIn to button so it waits for user login then shares