diff --git a/src/components/pages/home.jsx b/src/components/pages/home.jsx
index 514693e..2d46d63 100644
--- a/src/components/pages/home.jsx
+++ b/src/components/pages/home.jsx
@@ -136,7 +136,7 @@ class Home extends React.Component {
return (
-
+ {this.props.history.push('/profile');}} />
);
diff --git a/src/components/panels/login.jsx b/src/components/panels/login.jsx
index 7d5a4dc..3fab1fe 100644
--- a/src/components/panels/login.jsx
+++ b/src/components/panels/login.jsx
@@ -60,6 +60,10 @@ class Login extends React.Component {
if (xhr.status === 200) {
let json = JSON.parse(xhr.responseText);
this.props.login(json.id, json.email, json.username, json.token);
+
+ if (this.props.onSubmit) {
+ this.props.onSubmit();
+ }
}
else if (xhr.status === 400) {