diff --git a/monkey/monkey_island/cc/ui/src/components/pages/LoginPage.js b/monkey/monkey_island/cc/ui/src/components/pages/LoginPage.js
index 44e9dc595..04e1ab506 100644
--- a/monkey/monkey_island/cc/ui/src/components/pages/LoginPage.js
+++ b/monkey/monkey_island/cc/ui/src/components/pages/LoginPage.js
@@ -4,10 +4,11 @@ import {Button, Col, Container, Form, Row} from 'react-bootstrap';
import AuthService from '../../services/AuthService';
import Particles from "react-particles-js";
import {particleParams} from "../../styles/particle-component/AuthPageParams";
-import monkeyDetective from "../../images/militant-monkey.svg";
+import monkeyGeneral from "../../images/militant-monkey.svg";
class LoginPageComponent extends React.Component {
- login = () => {
+ login = (event) => {
+ event.preventDefault()
this.auth.login(this.username, this.password).then(res => {
if (res['result']) {
this.redirectToHome();
@@ -66,12 +67,10 @@ class LoginPageComponent extends React.Component {
Login
-
this.updateUsername(evt)} type='text' placeholder='Username'/>
this.updatePassword(evt)} type='password' placeholder='Password'/>
-
-
+
diff --git a/monkey/monkey_island/cc/ui/src/components/pages/RegisterPage.js b/monkey/monkey_island/cc/ui/src/components/pages/RegisterPage.js
index 4706ff819..62ff0e170 100644
--- a/monkey/monkey_island/cc/ui/src/components/pages/RegisterPage.js
+++ b/monkey/monkey_island/cc/ui/src/components/pages/RegisterPage.js
@@ -10,7 +10,8 @@ class RegisterPageComponent extends React.Component {
NO_AUTH_API_ENDPOINT = '/api/environment';
- register = () => {
+ register = (event) => {
+ event.preventDefault();
this.auth.register(this.username, this.password).then(res => {
this.setState({failed: false, error: ''});
if (res['result']) {
@@ -89,13 +90,11 @@ class RegisterPageComponent extends React.Component {
First time?
Let's secure your Monkey Island!
-
this.updateUsername(evt)} type='text' placeholder='Username'/>
this.updatePassword(evt)} type='password' placeholder='Password'/>
- {
- this.register()
- }}>
- Lets go!
+
+ Let's go!