text: import React, { PropTypes } from 'react'
  import {
    ScrollView,
    TextInput,
    Button,
    Text,
    View,
    Image,
    ActivityIndicator
  } from 'react-native';
  import { observer, inject } from 'mobx-react/native'
  import Icon from 'react-native-vector-icons/FontAwesome'
  import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view'
  
  import LoginForm from '../components/LoginForm'
  import RegistrationForm from '../components/RegistrationForm'
  
  @inject('users') @observer
  class Login extends React.Component {
    onLogin(email, password) {
      this.props.users.login(email, password);
    }
  
    onPressRegister(email, password, name) {
      this.props.users.register(email, password, name);
    }
  
    render() {
      return (
        <KeyboardAwareScrollView style={{padding: 20, marginTop: 20, backgroundColor: '#eee'}}>
          <Icon name="comments" size={60} color='#ccc' style={{alignSelf: 'center', paddingBottom: 20}}/>
          <View style={{alignItems: 'center', marginBottom: 20}}>
            <Text>- please, login to continue -</Text>
          </View>
          <LoginForm
            onPress={this.onLogin.bind(this)}
            busy={this.props.users.loggingIn}
            loggingError={this.props.users.loggingError}
          />
          <View style={{alignItems: 'center', marginTop: 20, marginBottom: 20}}>
            <Text>- or register -</Text>
          </View>
          <RegistrationForm
            onPress={this.onPressRegister.bind(this)}
            busy={this.props.users.registering}
            registeringError={this.props.users.registeringError}
          />
        </KeyboardAwareScrollView>
      )
    }
  }
  
  export default Login;
  