content: import React from 'react';
  const request = require('superagent');
  
  class Login extends React.Component {
  	constructor(props) {
  		super(props);
  
  		this.render = this.render.bind(this);
  		this.loginChange = this.loginChange.bind(this);
  		this.sendLogin = this.sendLogin.bind(this);
  
  		this.values = {};
  	}
  	loginChange(e) {
  		this.values[e.target.id] = e.target.value;
  		console.log(this.values);
  		this.login = this.values.login;
  		this.password = this.values.password;
  		this.email = this.values.email;
  	}
  	sendLogin(e) {
  		e.preventDefault();
  		console.log(this.values);
  		request
  			.post('http://localhost:8080/add/user')
  			.withCredentials()
  			.send({ login: this.login })
  			.send({ password: this.password })
  			.send({ email: this.email })
  			.end();
  
  	}
  
  	render() {
  		return (
  			<div className="login">
  				<form>
  				<div className="title-login">Registration form</div>
  				<div className="login-item">
  					<i className="icon fa fa-user fa-2x"></i>
  					<input 
  						className="login-input"
  						id="login" 
  						placeholder="Enter login"
  						onChange={this.loginChange}
  					/>
  				</div>
  				<br />
  				<div className="login-item">
  					<i className="icon fa fa-lock fa-2x"></i>
  					<input 
  						className="login-input"
  						id="password" 
  						placeholder="Enter password"
  						type="password"
  						onChange={this.loginChange}
  					/>
  				</div>
  					<br />
  				<div className="login-item">
  					<i className="icon fa fa-envelope-o fa-2x"></i>
  					<input 
  						className="login-input"
  						id="email"
  						placeholder="Enter your e-mail"
  						onChange={this.loginChange}
  					/>
  				</div>
  					<br />
  				<div className="button" onClick={ this.sendLogin }>Register</div>
  				</form>
  			</div>
  		);
  	}
  }
  
  export default Login;
  