diff --git a/client/modules/User/components/SocialAuthButton.jsx b/client/modules/User/components/SocialAuthButton.jsx
index 779c06e876..ac4a8b3b11 100644
--- a/client/modules/User/components/SocialAuthButton.jsx
+++ b/client/modules/User/components/SocialAuthButton.jsx
@@ -8,6 +8,7 @@ import { remSize } from '../../../theme';
import { GithubIcon, GoogleIcon } from '../../../common/icons';
import Button from '../../../common/Button';
import { unlinkService } from '../actions';
+import { persistState } from '../../IDE/actions/project';
const authUrls = {
github: '/auth/github',
@@ -64,6 +65,7 @@ function SocialAuthButton({ service, linkStyle, isConnected }) {
}
href={authUrls[service]}
+ onClick={() => dispatch(persistState())}
>
{connectLabel}
@@ -73,6 +75,7 @@ function SocialAuthButton({ service, linkStyle, isConnected }) {
}
href={authUrls[service]}
+ onClick={() => dispatch(persistState())}
>
{loginLabel}