<commit_before>import Actions from './action_types';
import axios from 'axios';

const API_HOST = 'http://api.meirim.org';

const loginActions = {

	login: function (loginForm) {
		return function (dispatch) {
			dispatch({
				type: Actions.LOGIN,
			});
			return axios.post(API_HOST + '/sign/in', loginForm).then(function (result) {
				return dispatch({
					type: Actions.LOGIN_SUCCESS,
					data: result
				});
			}, function (result) {
				return dispatch({
					type: Actions.LOGIN_ERROR,
					data: result
				});
			});
		};
	},

	signup: function (loginForm) {
		return function (dispatch) {
			dispatch({
				type: Actions.LOGIN,<commit_msg>Added with credentials to Axios<commit_after>import Actions from './action_types';
import axios from 'axios';

const API_HOST = 'http://api.meirim.org';
axios.defaults.withCredentials = true; 

const loginActions = {

	login: function (loginForm) {
		return function (dispatch) {
			dispatch({
				type: Actions.LOGIN,
			});
			return axios.post(API_HOST + '/sign/in', loginForm).then(function (result) {
				return dispatch({
					type: Actions.LOGIN_SUCCESS,
					data: result
				});
			}, function (result) {
				return dispatch({
					type: Actions.LOGIN_ERROR,
					data: result
				});
			});
		};
	},

	signup: function (loginForm) {
		return function (dispatch) {
			dispatch({
				type: Actions.LOGIN,
{'fraction_non_alphanumeric': 0.1390922401171303, 'fraction_numerical': 0.0, 'mean_word_length': 3.2585669781931466, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '239217', 'n_tokens_mistral': 546, 'n_tokens_neox': 434, 'n_words': 105}