diff --git a/package-lock.json b/package-lock.json
index a8fb0106a47c902e2206ec5511f11b2704b751f5..cb6f20995cd7290456862eed47a271e5bc0d3b0b 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -2538,11 +2538,18 @@
       "integrity": "sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA=="
     },
     "axios": {
-      "version": "0.19.2",
-      "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz",
-      "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==",
+      "version": "0.21.1",
+      "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz",
+      "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==",
       "requires": {
-        "follow-redirects": "1.5.10"
+        "follow-redirects": "^1.10.0"
+      },
+      "dependencies": {
+        "follow-redirects": {
+          "version": "1.13.1",
+          "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.1.tgz",
+          "integrity": "sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg=="
+        }
       }
     },
     "axobject-query": {
diff --git a/package.json b/package.json
index 95bdc57afcd91439c09a529b754a3c8a4e11fb1b..22c837b427c03bfe990bf426d6fcddca56b69ad9 100644
--- a/package.json
+++ b/package.json
@@ -8,7 +8,7 @@
     "@material-ui/lab": "^4.0.0-alpha.57",
     "@material-ui/styles": "^4.11.2",
     "@syncfusion/ej2-react-inputs": "^18.3.52",
-    "axios": "^0.19.2",
+    "axios": "^0.21.1",
     "base64-img": "^1.0.4",
     "binary-extensions": "^2.1.0",
     "build": "^0.1.4",
diff --git a/src/Components/AboutResource.js b/src/Components/AboutResource.js
deleted file mode 100644
index 87a0949e185d9dbdaa6f1661f4e6af9de358b7dc..0000000000000000000000000000000000000000
--- a/src/Components/AboutResource.js
+++ /dev/null
@@ -1,264 +0,0 @@
-/*Copyright (C) 2019 Centro de Computacao Cientifica e Software Livre
-Departamento de Informatica - Universidade Federal do Parana
-
-This file is part of Plataforma Integrada MEC.
-
-Plataforma Integrada MEC is free software: you can redistribute it and/or modify
-it under the terms of the GNU Affero General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-Plataforma Integrada MEC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU Affero General Public License for more details.
-
-You should have received a copy of the GNU Affero General Public License
-along with Plataforma Integrada MEC.  If not, see <http://www.gnu.org/licenses/>.*/
-
-import React from 'react';
-import axios from 'axios';
-import {apiUrl} from '../env';
-import {Col,Row} from 'react-grid-system';
-import Paper from '@material-ui/core/Paper';
-import Typography from '@material-ui/core/Typography';
-import CardContent from '@material-ui/core/CardContent';
-import Collapse from '@material-ui/core/Collapse';
-import CardMedia from '@material-ui/core/CardMedia';
-import CardActions from '@material-ui/core/CardActions';
-import Coment from './Coment';
-import Rating from '@material-ui/lab/Rating';
-import Tag from './Tags';
-import { Hidden } from '@material-ui/core';
-import Button from '@material-ui/core/Button';
-import IconButton from '@material-ui/core/IconButton';
-import Menu from '@material-ui/core/Menu';
-import ListItemIcon from '@material-ui/core/ListItemIcon';
-import MenuItem from '@material-ui/core/MenuItem';
-import MoreVertIcon from '@material-ui/icons/MoreVert';
-/*imagens e icones*/
-import ExpandMoreIcon from '@material-ui/icons/ExpandMore';
-import ShareIcon from '@material-ui/icons/Share';
-import ReportIcon from '@material-ui/icons/Error';
-import AddIcon from '@material-ui/icons/CreateNewFolder';
-import FavoriteIcon from '@material-ui/icons/Favorite';
-import GetAppIcon from '@material-ui/icons/GetApp';
-import StarBorderIcon from '@material-ui/icons/StarBorder';
-import RateReviewIcon from '@material-ui/icons/RateReview';
-import VisibilityIcon from '@material-ui/icons/Visibility';
-import SdCardIcon from '@material-ui/icons/SdCard';
-import TranslateIcon from '@material-ui/icons/Translate';
-import InsertDriveFileIcon from '@material-ui/icons/InsertDriveFile';
-import DateRangeIcon from '@material-ui/icons/DateRange';
-import UpdateIcon from '@material-ui/icons/Update';
-import AssignmentOutlinedIcon from '@material-ui/icons/AssignmentOutlined';
-import OpenIcon from '@material-ui/icons/CallMade';
-import { TextField, FormControl } from '@material-ui/core';
-
-import noAvatar from "../img/default_profile.png";
-import styled from 'styled-components'
-
-
-
-const TypographyStyled = styled(Typography)`
-  padding: 5px;
-`
-
-const CardActionsStyled = styled(CardActions)`
-  padding:0px 0px 10px 0px;
-  align-items: center;
-`
-
-const PaperStyled = styled(Paper)`
-  margin: 2em 0em 2em 0em;
-  padding: 2em 2em 0em 2em;
-  @media only screen and (min-width :500px ) {
-    margin: 2em 10% 2em 10%;
-  }
-`
-const elevateStyle = 3;
-
-const Overlay = styled.div`
-  display: inline;
-  background: linear-gradient(transparent,transparent,#fff),transparent;
-  bottom: 0;
-  cursor: pointer;
-  left: 0;
-  opacity: .8;
-  filter: alpha(opacity=80);
-  position: absolute;
-  right: 0;
-  top: 0;
-  height: inherit;
-
-`
-async function getResource(id){
-  let res = await axios.get(`${apiUrl}/learning_objects/${id}`);
-  let data = res.data;
-  return(data);
-}
-
-export default function AboutResource() {
-
-  var display = getResource(19133);
-  console.log(display);
-  const [anchorEl, setAnchorEl] = React.useState(null);
-
-  function handleClick(event) {
-    setAnchorEl(event.currentTarget);
-  }
-
-  function handleClose() {
-    setAnchorEl(null);
-  }
-  return (
-    <div style={{backgroundColor: "#f4f4f4", padding: "2em 0em 2em 0em"}}>
-      <PaperStyled elevation={elevateStyle}>
-        <CardMedia image={noAvatar}/>
-        <CardContent style={{padding: "0em"}}>
-          <Typography variant="h5" color="textSecondary" component="h3">
-          {display.name}
-          </Typography>
-          <CardActionsStyled >
-            <IconButton style={{padding: "0px"}}aria-label="Favoritar">
-              <FavoriteIcon />
-            </IconButton>
-            <Rating
-              name="customized-empty"
-              value={2}
-              precision={0.5}
-              emptyIcon={<StarBorderIcon fontSize="inherit" />}
-            />
-            <Hidden smDown>
-              <IconButton aria-label="Relatar">
-                <RateReviewIcon/>
-              </IconButton>
-              RELATAR
-            </Hidden>
-            </CardActionsStyled>
-            <CardContent style={{padding: "0em"}}>
-              <TypographyStyled component="p" color="textSecondary">
-              Tipo de Recurso:
-              </TypographyStyled>
-              <TypographyStyled component="p" color="textSecondary">
-              Componentes Curriculares:
-              </TypographyStyled>
-              <TypographyStyled component="p" color="textSecondary">
-              Outras Temáticas:
-              </TypographyStyled>
-              <TypographyStyled component="p" color="textSecondary">
-              Etapas de Ensino:
-              </TypographyStyled>
-            </CardContent>
-          <Row >
-            <Col md={4} sm={12}><VisibilityIcon style={{verticalAlign: "middle"}}/>Visualizações:</Col>
-            <Col md={5} sm={12}><GetAppIcon style={{verticalAlign: "middle"}}/>Baixados/Acessados:</Col>
-          </Row>
-          <CardActions disableSpacing style={{fontSize: "0.7rem", borderRadius: "2px", justifyContent: "space-between", paddingTop: "2em"}}>
-            <Hidden smDown>
-              <Button  aria-label="Reportar" size="small">
-              <ReportIcon />     REPORTAR ABUSO OU ERRO        </Button>
-              <Button aria-label="Compartilhar">
-              <ShareIcon />   COMPARTILHAR          </Button>
-            </Hidden>
-            <Button aria-label="Guardar">
-            <AddIcon />   GUARDAR          </Button>
-            <Button variant="contained" color="secondary">
-            <OpenIcon/> Abrir Recurso </Button>
-            <Hidden mdUp>
-            <Button aria-controls="simple-menu" aria-haspopup="true" onClick={handleClick}>
-              <MoreVertIcon/>
-            </Button>
-            <Menu
-              id="simple-menu"
-              anchorEl={anchorEl}
-              keepMounted
-              open={Boolean(anchorEl)}
-              onClose={handleClose}
-            >
-              <MenuItem onClick={handleClose}>
-              <ListItemIcon>
-                <ShareIcon />
-              </ListItemIcon>
-              Compartilhar</MenuItem>
-              <MenuItem onClick={handleClose}>
-              <ListItemIcon>
-                <ReportIcon />
-              </ListItemIcon>
-              Reportar</MenuItem>
-            </Menu>
-            </Hidden>
-          </CardActions>
-    </CardContent>
-      </PaperStyled>
-      <PaperStyled elevation={elevateStyle}>
-        <Row style={{padding: "15px"}}>
-          <Col md={8} sm={12}>
-            <Typography variant="h5" color="textSecondary" component="h3">
-            Sobre o Recurso
-            </Typography>
-            <Typography component="p" color="textSecondary">
-            Paper can be used to build surface or other elements for your application.
-            </Typography>
-            <div style={{paddingTop: "4em"}}>
-            <Typography variant="h5" color="textSecondary" component="h3">
-            Informações Adicionais</Typography>
-            <Tag name="teste"/>
-            <Typography component="p" color="textSecondary">
-            <SdCardIcon/>Tamanho:
-            </Typography>
-            <Typography component="p" color="textSecondary">
-            <TranslateIcon/>Idioma:
-            </Typography>
-            <Typography component="p" color="textSecondary">
-            <InsertDriveFileIcon/>Formato:
-            </Typography>
-            <Typography component="p" color="textSecondary">
-            <DateRangeIcon/>Data de Envio:
-            </Typography>
-            <Typography component="p" color="textSecondary">
-            <UpdateIcon/>Modificado em:
-            </Typography>
-            <Typography component="p" color="textSecondary">
-            <AssignmentOutlinedIcon/>Tipo de Licença:
-            </Typography>
-            </div>
-          </Col>
-          <Col md={4}  sm={12}>
-            <div style={{borderLeft:"1px solid #e5e5e5"}}>
-              <Typography>
-                Enviado por:
-              </Typography><br/>
-              <img style={{padding: "2em" }} alt="Avatar" src={noAvatar} height="100em"/>
-            </div>
-          </Col>
-      </Row>
-
-
-      </PaperStyled>
-      <PaperStyled elevation={elevateStyle}>
-        <CardContent>
-            Conte sua experiência com o Recurso
-            <Rating
-              name="customized-color"
-              value={0}
-              precision={0.5}
-            />
-            <Row>
-              <Col md={10} sm={12}>
-                <TextField fullWidth="true" multiline="true" required="true" placeholder="Escreva aqui sua experiência com o recurso *"/>
-              </Col>
-              <Col>
-                <Button variant="contained" color="primary">submit </Button>
-              </Col>
-            </Row>
-
-        </CardContent>
-        <CardContent>
-          <Typography variant="h5" component="p" color="textSecondary">Relatos sobre o uso do Recurso</Typography>
-          <Coment author="jorginho" coment="muito bom gostei mto bom msm"/>
-        </CardContent>
-      </PaperStyled>
-    </div>
-  );
-}
diff --git a/src/Components/AcessibilityBar.js b/src/Components/AcessibilityBar.js
deleted file mode 100644
index 7546ea2f92646dc4ee8da27a1f5550d8fc702a2a..0000000000000000000000000000000000000000
--- a/src/Components/AcessibilityBar.js
+++ /dev/null
@@ -1,60 +0,0 @@
-/*Copyright (C) 2019 Centro de Computacao Cientifica e Software Livre
-Departamento de Informatica - Universidade Federal do Parana
-
-This file is part of Plataforma Integrada MEC.
-
-Plataforma Integrada MEC is free software: you can redistribute it and/or modify
-it under the terms of the GNU Affero General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-Plataforma Integrada MEC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU Affero General Public License for more details.
-
-You should have received a copy of the GNU Affero General Public License
-along with Plataforma Integrada MEC.  If not, see <http://www.gnu.org/licenses/>.*/
-
-import React, {Component} from 'react';
-import {Row, Col, Container} from 'react-grid-system';
-import Bt from './Button.js'
-
-const acessibilityBar ={
-  width: '100%',
-  color: 'gray',
-  fontFamily: '"Roboto", Sans-Serif',
-  whiteSpace: 'nowrap',
-  fontSize: '0.7vw',
-  textAlign: 'right'
-
-}
-
-class AcessibilityBar extends Component{
-  renderBt(name, link=undefined){
-    return <Bt name={name} link={link}/>
-  }
-  render(){
-    return(
-    <Container fluid={true}>
-      <Row style={acessibilityBar}>
-        <Col md={6} xs={6} lg={6} style={{textAlign: 'left'}}>
-          {this.renderBt("Ir para conteúdo 1", "texto1")}
-          {this.renderBt("Ir para menu 2", "texto2")}
-          {this.renderBt("Ir para menu 3", "texto3")}
-          {this.renderBt("Ir para rodapé 4", "texto4")}
-        </Col>
-        <Col md={6} xs={6} lg={6} style={{textAlign: 'right'}}>
-          Tamanho do Texto: {this.renderBt("A+")}
-          {this.renderBt("A-")}
-          {this.renderBt("A")}
-          {this.renderBt("Contraste")}
-          {this.renderBt("Acessibilidade")}
-          {this.renderBt("Mapa do Site")}
-        </Col>
-      </Row>
-    </Container>
-  );
-  }
-}
-export default AcessibilityBar;
diff --git a/src/Components/ActivityListItem.js b/src/Components/ActivityListItem.js
index 00def5db6b3f1cd7e3ca5ed49e8a5f187a829dfe..e6d9d2b7d0de16dbcad37d965ba11c4ed394f2c6 100644
--- a/src/Components/ActivityListItem.js
+++ b/src/Components/ActivityListItem.js
@@ -34,6 +34,7 @@ import ReportIcon from '@material-ui/icons/Report';
 import CloudUploadIcon from '@material-ui/icons/CloudUpload';
 import ThumbDownIcon from '@material-ui/icons/ThumbDown';
 import DeleteIcon from '@material-ui/icons/Delete';
+import {Link} from 'react-router-dom'
 
 const GetObjectColor = (tag) => {
     return ObjectColor[tag]
@@ -137,7 +138,7 @@ export default function ActivityListItem (props) {
                 secondary = {
                     <div>
                         <span>
-                            <a href={props.ownerHref} className="owner-name-a" >{props.ownerName}</a> {activity.text} <a href={props.recipientHref} className="recipient-name-a">{props.recipientName}</a> {activity.text2}
+                            <Link to={props.ownerHref} className="owner-name-a" >{props.ownerName}</Link> {activity.text} <Link to={props.recipientHref} className="recipient-name-a">{props.recipientName}</Link> {activity.text2}
                         </span>
                     </div>
                 }
diff --git a/src/Components/AreasSubPages.js b/src/Components/AreasSubPages.js
index 502eb6af0190c3f4e8e0b36f2d866fe3527877fb..b8d429a946ea7f27d93034d0baddef361cfc3582 100644
--- a/src/Components/AreasSubPages.js
+++ b/src/Components/AreasSubPages.js
@@ -17,8 +17,6 @@ You should have received a copy of the GNU Affero General Public License
 along with Plataforma Integrada MEC.  If not, see <http://www.gnu.org/licenses/>.*/
 
 import React, { Component } from "react";
-import axios from "axios";
-import { apiUrl } from "../env";
 import "./carousel.css";
 import { Col, Row, Container, Hidden, Visible } from "react-grid-system";
 import MaterialCard from "./MaterialCard";
@@ -31,6 +29,7 @@ import ResourceCardFunction from "./ResourceCardFunction.js";
 import CollectionCardFunction from "./CollectionCardFunction.js";
 import colecoes_obj from './FormationMaterialsResources/formationMaterials';
 import ExpandedMaterial from './ExpandedMaterials';
+import {getRequest} from './HelperFunctions/getAxiosConfig.js'
 
 const materials = colecoes_obj();
 
@@ -41,12 +40,10 @@ class ReqResources extends Component {
       resources: [],
     };
   }
+
   componentDidMount() {
-    axios
-      .get(`${apiUrl}/learning_objects?limit=12&sort=["published_at", "desc"]`)
-      .then((res) => {
-        this.setState({ resources: res.data });
-      });
+    const url = `/learning_objects?limit=12&sort=["published_at", "desc"]`
+    getRequest(url, (data) => {this.setState({ resources: data })}, (error) => {console.log(error)})
   }
 
   resourcesPerPage() {
@@ -64,8 +61,6 @@ class ReqResources extends Component {
     }
   }
 
-
-
   render() {
     var rows = []
     var resources_per_page = this.resourcesPerPage()
@@ -112,12 +107,9 @@ class ReqCollections extends Component {
     };
   }
   componentDidMount() {
-    axios
-      .get(`${apiUrl}/collections?limit=12&sort=["updated_at", "desc"]`)
-      .then((res) => {
-        this.setState({ collections: res.data });
-        console.log(res.data);
-      });
+      const url = `/collections?limit=12&sort=["updated_at", "desc"]`
+
+      getRequest(url, (data) => {this.setState({ collections: data })}, (error) => {console.log(error)})
   }
   collectionsPerPage() {
     var pageWidth = window.innerWidth
diff --git a/src/Components/Button.js b/src/Components/Button.js
deleted file mode 100644
index afe4acadacfa68b9e44d0c98b042352108c9305d..0000000000000000000000000000000000000000
--- a/src/Components/Button.js
+++ /dev/null
@@ -1,75 +0,0 @@
-/*Copyright (C) 2019 Centro de Computacao Cientifica e Software Livre
-Departamento de Informatica - Universidade Federal do Parana
-
-This file is part of Plataforma Integrada MEC.
-
-Plataforma Integrada MEC is free software: you can redistribute it and/or modify
-it under the terms of the GNU Affero General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-Plataforma Integrada MEC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU Affero General Public License for more details.
-
-You should have received a copy of the GNU Affero General Public License
-along with Plataforma Integrada MEC.  If not, see <http://www.gnu.org/licenses/>.*/
-
-import React, {Component} from 'react';
-
-class Bt extends Component{
-  constructor(props){
-    super(props);
-
-    this.state ={
-      color: "white",
-      hover: "#F0F0F0",
-      iddle: "white"
-    };
-  }
-  componentWillMount(){
-    if (this.props.backhover){
-      this.setState({hover: this.props.backhover})
-    }
-    if (this.props.iddle){
-      this.setState({color:this.props.background,
-                      iddle: this.props.background})
-    }
-  }
-  onHover(){
-    this.setState({color: this.state.hover})
-  }
-  onIddle(){
-    this.setState({color: this.state.iddle})
-  }
-  onClick(){
-    if(this.props.link === undefined){
-    }
-    if(this.props.method !== undefined ){
-      console.log(this.props.parameter)
-       this.props.method(this.props.parameter)
-    }
-    else {
-      alert(`goto ${this.props.link}`)
-    }
-  }
-
-  render(){
-    const acessibilityBt = {
-      borderStyle: 'none',
-      padding: '10px',
-      textAlign: 'center',
-      display: 'inline-block',
-      backgroundColor: this.state.color,
-      color: "#ababab"
-    };
-    return(
-      <span id={this.props.name +"-Button"} style={acessibilityBt} onMouseEnter={this.onHover.bind(this)} onMouseOut={this.onIddle.bind(this)} onClick={this.onClick.bind(this)}>
-        {this.props.name}
-      </span>
-    );
-  }
-}
-
-export default Bt;
diff --git a/src/Components/Card.js b/src/Components/Card.js
deleted file mode 100644
index e721b5504a51eb1a24130c0028bba39da9ee6555..0000000000000000000000000000000000000000
--- a/src/Components/Card.js
+++ /dev/null
@@ -1,105 +0,0 @@
-/*Copyright (C) 2019 Centro de Computacao Cientifica e Software Livre
-Departamento de Informatica - Universidade Federal do Parana
-
-This file is part of Plataforma Integrada MEC.
-
-Plataforma Integrada MEC is free software: you can redistribute it and/or modify
-it under the terms of the GNU Affero General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-Plataforma Integrada MEC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU Affero General Public License for more details.
-
-You should have received a copy of the GNU Affero General Public License
-along with Plataforma Integrada MEC.  If not, see <http://www.gnu.org/licenses/>.*/
-
-import React, {Component} from 'react';
-import {Container} from 'react-grid-system';
-import Card from '@material-ui/core/Card';
-import CardContent from '@material-ui/core/CardContent';
-import CardActions from '@material-ui/core/CardActions';
-import IconButton from '@material-ui/core/IconButton';
-import Typography from '@material-ui/core/Typography';
-import FavoriteIcon from '@material-ui/icons/Favorite';
-import StarRatings from 'react-star-ratings';
-import animacao from "../img/laranja/ANIMACAO_SIMULACAO.jpg";
-import apresentacao from "../img/laranja/APRESENTACAO.jpg";
-import aplicativo from "../img/laranja/APP.jpg";
-import audio from "../img/laranja/AUDIO.jpg";
-import vazio from "../img/laranja/EMPTY.jpg";
-import imagem from "../img/laranja/IMAGEM.jpg";
-import grafico from "../img/laranja/INFOGRAFICO.jpg";
-import jogo from "../img/laranja/JOGO.jpg";
-import livro from "../img/laranja/LIVRO_DIGITAL.jpg";
-import mapa from "../img/laranja/MAPA.jpg";
-import outros from "../img/laranja/OUTROS.jpg";
-import software from "../img/laranja/SOFTWARE.jpg";
-import texto from "../img/laranja/TEXTO.jpg";
-import video from "../img/laranja/VIDEO.jpg";
-
-import AddIcon from '@material-ui/icons/CreateNewFolder';
-import Options from './CardOptions'
-import Video from '@material-ui/icons/OndemandVideo';
-
-var types = [{label: "Animação", thumb: animacao}, {label: "Apresentação", thumb: apresentacao},
-{label: "Aplicativo" , thumb: aplicativo}, {label: "Áudio", thumb: audio}, {label: "Vazio", thumb: vazio}, {label: "Imagem", thumb: imagem}, {label: "Gráfico", thumb: grafico}, {label: "Jogo", thumb: jogo}, {label: "Livro", thumb: livro}, {label: "Mapa", thumb: mapa}, {label: "Outros", thumb: outros}, {label: "Software", thumb:software}, {label: "Texto", thumb:texto}, {label: "Vídeo", thumb:video}]
-class ResourceCard extends Component{
-  constructor(props){
-    super(props);
-    this.state = {
-      hover: false,
-      thumbnail: null,
-      isVideo: false,
-    };
- };
- decide(){
-   var aux = this.props.thumbnail;
-   if (!aux) {
-     aux = types.find(function(element){ return element.label === (this.props.type)});
-   }
-   this.setState({thumbnail: aux.thumb});
-   console.log(this.state.thumbnail);
-   (this.props.type === "Vídeo")? this.setState({isvideo:true}) : this.setState({isvideo:false});
-};
- render(){
-   {this.decide()}
-  return (
-    <Card>
-      <img src={this.state.thumbnail} alt="thumbnail do recurso"/>
-      <CardContent style={{height: "60%", textAlign: "left", paddingBottom: "0px"}}>
-        <Typography variant="body2" color="textSecondary" component="p" style={{height:"45px", overflow: "hidden", fontSize: "0.8em"}}>
-          {this.props.name}
-        </Typography>
-      </CardContent>
-      <Container style={{textAlign: "left"}}>
-        <StarRatings
-        rating={this.props.rating*100}
-        starRatedColor="ff7f00"
-        starDimension="20px"
-        starSpacing="2px"
-        starHoverColor="red"
-        />
-      </Container>
-      <CardActions style={{justifyContent: "space-between"}}>
-      { this.state.isVideo
-        ? <Video style={{color:"#ff7f00"}} />
-      : <br/>}
-        <IconButton  aria-label="Favoritar" size="small">
-          <FavoriteIcon />
-        </IconButton>
-      </CardActions>
-      <CardActions style={{borderTop:"1px solid #e5e5e5", justifyContent: "space-between"}}>
-
-      <IconButton aria-label="Guardar" size="small">
-        <AddIcon />
-      </IconButton>
-      <Options/>
-      </CardActions>
-    </Card>
-  );}
-}
-
-export default ResourceCard;
diff --git a/src/Components/ColCardPublicOptions.js b/src/Components/ColCardPublicOptions.js
index 0974c292c6b58ee14844c88eddd88c98d418a9f7..48a7bab2be1d264fb8681bb3e79637c68d08894f 100644
--- a/src/Components/ColCardPublicOptions.js
+++ b/src/Components/ColCardPublicOptions.js
@@ -16,25 +16,23 @@ GNU Affero General Public License for more details.
 You should have received a copy of the GNU Affero General Public License
 along with Plataforma Integrada MEC.  If not, see <http://www.gnu.org/licenses/>.*/
 
-import React, { useState } from "react";
-import Button from "@material-ui/core/Button";
-import Menu from "@material-ui/core/Menu";
-import ListItemIcon from "@material-ui/core/ListItemIcon";
-import MenuItem from "@material-ui/core/MenuItem";
-import OpenIcon from "@material-ui/icons/OpenInNew";
-import { Link } from "react-router-dom";
-import MoreVertIcon from "@material-ui/icons/MoreVert";
-import styled from "styled-components";
-import ErrorIcon from "@material-ui/icons/Error";
-import ReportModal from "./ReportModal.js";
-import { getAxiosConfig } from "../Components/HelperFunctions/getAxiosConfig";
-import axios from "axios";
+import React, {useState} from 'react';
+import Button from '@material-ui/core/Button';
+import Menu from '@material-ui/core/Menu';
+import ListItemIcon from '@material-ui/core/ListItemIcon';
+import MenuItem from '@material-ui/core/MenuItem';
+import OpenIcon from '@material-ui/icons/OpenInNew';
+import {Link} from 'react-router-dom'
+import MoreVertIcon from '@material-ui/icons/MoreVert';
+import styled from 'styled-components'
+import ErrorIcon from '@material-ui/icons/Error';
+import ReportModal from './ReportModal.js'
 import ReportProblemIcon from '@material-ui/icons/ReportProblem';
 import OpenInBrowserIcon from '@material-ui/icons/OpenInBrowser';
-import { apiUrl } from "../env";
+import {deleteRequest} from '../Components/HelperFunctions/getAxiosConfig'
 
-export default function ColCardPublicOptions(props) {
-    const [anchorEl, setAnchorEl] = React.useState(null);
+export default function ColCardPublicOptions (props) {
+  const [anchorEl, setAnchorEl] = React.useState(null);
 
     function handleClick(event) {
         setAnchorEl(event.currentTarget);
@@ -44,32 +42,13 @@ export default function ColCardPublicOptions(props) {
         setAnchorEl(null);
     }
 
-    const [reportModalOpen, toggleReportModal] = useState(false);
-    const handleReportModal = (value) => {
-        toggleReportModal(value);
-    };
+    const [reportModalOpen, toggleReportModal] = useState(false)
+    const handleReportModal = (value) => {toggleReportModal(value)}
 
     const handleUnfollow = () => {
-        let config = getAxiosConfig();
-        let payload = {};
-
-        axios
-            .put(`${apiUrl}/collections/` + props.id + "/follow", payload, config)
-            .then(
-                (response) => {
-                    console.log(response.data);
-                    if (response.headers["access-token"]) {
-                        sessionStorage.setItem(
-                            "@portalmec/accessToken",
-                            response.headers["access-token"]
-                        );
-                    }
-                },
-                (error) => {
-                    console.log(error);
-                }
-            );
-    };
+
+        deleteRequest(`/collections/${props.id}/follow`, (data) => {console.log(data)}, (error) => {console.log(error)})
+    }
 
     return (
         <>
diff --git a/src/Components/CollectionCardFunction.js b/src/Components/CollectionCardFunction.js
index 02503a44714e9eb7b4e55cbe5a6bc1872084aaee..de9bb18ce27f388c031c9bf7e40b104ea61d359f 100644
--- a/src/Components/CollectionCardFunction.js
+++ b/src/Components/CollectionCardFunction.js
@@ -16,9 +16,9 @@ GNU Affero General Public License for more details.
 You should have received a copy of the GNU Affero General Public License
 along with Plataforma Integrada MEC.  If not, see <http://www.gnu.org/licenses/>.*/
 
-import React, { useState, useContext, useEffect } from 'react';
-import { Store } from '../Store.js'
-import { apiDomain, apiUrl } from '../env';
+import React, {useState, useContext, useEffect} from 'react';
+import {Store} from '../Store.js'
+import {apiDomain} from '../env';
 import noAvatar from "../img/default_profile.png";
 import Button from '@material-ui/core/Button';
 import styled from 'styled-components'
@@ -35,8 +35,7 @@ import LockIcon from '@material-ui/icons/Lock';
 import ColCardOwnerOptions from './ColCardOwnerOptions.js'
 import ColCardPublicOptions from './ColCardPublicOptions'
 import { Link } from 'react-router-dom';
-import axios from 'axios'
-import { getAxiosConfig } from '../Components/HelperFunctions/getAxiosConfig'
+import {putRequest} from '../Components/HelperFunctions/getAxiosConfig'
 import { saveHeaders } from '../Components/HelperFunctions/saveTokens';
 import SignUpModal from './SignUpModal'
 import LoginModal from './LoginModal.js'
@@ -59,26 +58,13 @@ export default function CollectionCardFunction(props) {
     const [loginOpen, setLogin] = useState(false)
     const [successfulLoginOpen, handleSuccessfulLogin] = useState(false)
 
+
+    function handleSuccessLike (data) {
+        toggleLiked(!liked)
+        setLikesCount(data.count)
+    }
     const handleLike = () => {
-        let config = getAxiosConfig()
-
-        if (state.currentUser.id) {
-            axios({
-                method: 'put',
-                url: `${apiUrl}/collections/` + props.id + '/like',
-                headers: config.headers
-            }).then(
-                (response) => {
-                    toggleLiked(!liked)
-                    setLikesCount(response.data.count)
-                    saveHeaders(response)
-                },
-                (error) => { console.log(error) }
-            )
-        }
-        else {
-            setLogin(!loginOpen)
-        }
+        putRequest(`/collections/${props.id}/like`, {}, handleSuccessLike, (error) => {console.log(error)})
     }
 
     const [followingHover, handleFollowingHover] = useState(false)
@@ -87,22 +73,11 @@ export default function CollectionCardFunction(props) {
     const [slideIn, setSlide] = useState(false)
     const controlSlide = () => { setSlide(!slideIn) }
 
+    function handleSuccessFollow (data) {
+        handleToggleUserFollowingCol()
+    }
     const handleFollow = () => {
-        let config = getAxiosConfig()
-        let payload = {}
-
-        if (state.currentUser.id) {
-            axios.put((`${apiUrl}/collections/` + props.id + '/follow'), payload, config).then(
-                (response) => {
-                    saveHeaders(response)
-                    handleToggleUserFollowingCol()
-                },
-                (error) => { console.log(error) }
-            )
-        }
-        else {
-            setLogin(!loginOpen)
-        }
+        putRequest(`/collections/${props.id}/follow`, {}, handleSuccessFollow, (error) => {console.log(error)})
     }
 
     const RenderFollowButton = () => {
diff --git a/src/Components/CollectionCommentSection.js b/src/Components/CollectionCommentSection.js
index 375a4ba43ee3e5ffb9deed30bf87687fbc9376b8..ccc7f079dae76494734addd6116bdaf6a331ae5d 100644
--- a/src/Components/CollectionCommentSection.js
+++ b/src/Components/CollectionCommentSection.js
@@ -22,13 +22,12 @@ import Card from '@material-ui/core/Card';
 import Button from '@material-ui/core/Button';
 import EditIcon from '@material-ui/icons/Edit';
 import styled from 'styled-components';
-import axios from 'axios';
-import { apiUrl } from '../env';
 import CommentForm from './ResourcePageComponents/CommentForm.js';
 import Comment from './Comment.js';
 import Snackbar from '@material-ui/core/Snackbar';
 import MuiAlert from '@material-ui/lab/Alert';
 import Comentario from '../img/comentarios.png';
+import {getRequest} from '../Components/HelperFunctions/getAxiosConfig'
 
 export default function CollectionCommentSection(props) {
 	const [post_snack_open, setPostSnackOpen] = useState(false);
@@ -36,9 +35,9 @@ export default function CollectionCommentSection(props) {
 	const [render_state, setRenderState] = useState(false);
 	const [reviews, setReviews] = useState([]);
 	const comment_ref = useRef(null);
-	
+
 	const forceUpdate = () => { setRenderState(!render_state); }
-	
+
 	const handlePostSnackbar = () => {
 		setPostSnackOpen(!post_snack_open);
 	}
@@ -114,10 +113,7 @@ export default function CollectionCommentSection(props) {
 	}
 
 	useEffect(() => {
-		axios.get(apiUrl+'/collections/'+props.id+'/reviews')
-			.then(res => {
-				setReviews(res.data);
-			});
+        getRequest(`/collections/${props.id}/reviews`, (data) => {setReviews(data)}, (error) => {console.log(error)})
 	}, [render_state]);
 
 	return (
diff --git a/src/Components/CollectionReview.js b/src/Components/CollectionReview.js
index c1b2d4f0472483c8ebd564d56ee51c49f77b42ed..10cc202c3ff6f3908aeb09c7d0d4fb567505fddb 100644
--- a/src/Components/CollectionReview.js
+++ b/src/Components/CollectionReview.js
@@ -23,12 +23,11 @@ import IconButton from '@material-ui/core/IconButton';
 import StarBorderIcon from '@material-ui/icons/StarBorder';
 import FavoriteIcon from '@material-ui/icons/Favorite';
 import InfoIcon from '@material-ui/icons/Info';
-import axios from 'axios';
-import { apiUrl } from '../env';
 import { Store } from '../Store.js'
 import ReportModal from './ReportModal.js';
 import SignUpModal from './SignUpModal.js';
 import LoginModal from './LoginModal.js';
+import {putRequest, getRequest} from './HelperFunctions/getAxiosConfig.js'
 
 export default function CollectionReview(props) {
 	const [likes, setLikes] = useState(0);
@@ -39,61 +38,31 @@ export default function CollectionReview(props) {
 	const [log_in_open, setLoginOpen] = useState(false);
 	const { state } = useContext(Store);
 
+    function handleSuccessfulGet (data) {
+        setLikes(Number(data.likes_count));
+        setLiked(data.liked);
+    }
+
 	useEffect(() => {
-		axios.get(apiUrl + '/collections/' + props.id)
-			.then(res => {
-				setLikes(Number(res.data.likes_count));
-				setLiked(res.data.liked);
-			});
+        const url = `/collections/${props.id}`
+
+        getRequest(url, handleSuccessfulGet, (error) => {console.log(error)})
+
 	}, [props.id]);
 
 	const handleClickReport = () => {
 		setReportOpen(true);
 	}
 
-	const SaveNewHeaders = (response) => {
-		if (
-			(response.headers['access-token'] === undefined || response.headers['access-token'] === null) &&
-			(response.headers.client === undefined || response.headers.client === null)
-		) {
-	
-		} else {
-			sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-			sessionStorage.setItem('@portalmec/clientToken', response.headers.client)
-			console.log('saved')
-		}
-	}
+    function handleSuccess (data) {
+        setLiked(!liked)
+        setLikes(data.count)
+    }
 
 	const handleLikeClick = () => {
 		if (state.currentUser.id) {
-			const url = apiUrl + '/collections/' + props.id + '/like';
-			if (!liked)
-				axios({
-					method: 'put',
-					url: url,
-					headers: {
-						'Accept': 'application/json',
-						'Content-Type': 'application/json; charset=utf-8',
-						'access-token': sessionStorage.getItem('@portalmec/accessToken'),
-						'client': sessionStorage.getItem('@portalmec/clientToken'),
-						'uid': sessionStorage.getItem('@portalmec/uid'),
-						'If-None-Match': null
-					},
-				}).then(response => {
-					if(response.status === 201)
-					{
-						setLiked(true)
-						setLikes(response.data.count);
-					}
-					else 
-					{
-						setLiked(false);
-						setLikes(response.data.count);
-					}
-					SaveNewHeaders(response)
-				})
-			else
-				setLiked(!liked);
+            const url = `/collections/${props.id}/like`
+            putRequest(url, {}, handleSuccess, (error) => {console.log(error)})
 		} else
 			setSignUpOpen(true);
 	}
diff --git a/src/Components/Coment.js b/src/Components/Coment.js
deleted file mode 100644
index f76cbf7fc21d321d7ce4155f57d4580f00190c75..0000000000000000000000000000000000000000
--- a/src/Components/Coment.js
+++ /dev/null
@@ -1,27 +0,0 @@
-import React, {Component} from 'react';
-import CardContent from '@material-ui/core/CardContent';
-import Typography from '@material-ui/core/Typography';
-import StarRatings from 'react-star-ratings';
-
-
-class Coment extends Component {
-  constructor(props) {
-    super(props);
-
-  }
-render(){
-  return(
-    <CardContent>
-    <StarRatings
-         rating={2}
-         starRatedColor="ff7f00"
-         starDimension="20px"
-         starSpacing="2px"
-         />
-      <Typography component="p" varitant="srOnly" style={{color: "orange"}}> {this.props.author}:{this.props.coment}</Typography>
-    </CardContent>
-  );
-}
-
-}
-export default Coment;
diff --git a/src/Components/Comment.js b/src/Components/Comment.js
index 51850497b9898ee2030d7ccfa7e3416e2bf3065f..09b66d5ad2f83e4ad3f10994de899960ca4f1b49 100644
--- a/src/Components/Comment.js
+++ b/src/Components/Comment.js
@@ -28,11 +28,10 @@ import Rating from '@material-ui/lab/Rating';
 import StarBorderIcon from '@material-ui/icons/StarBorder';
 import EditIcon from '@material-ui/icons/Edit';
 import TextField from "@material-ui/core/TextField";
-import axios from 'axios'
-import {apiUrl} from '../env';
 import Menu from '@material-ui/core/Menu';
 import MenuItem from '@material-ui/core/MenuItem';
 import ModalExcluir from './ModalExcluirComentario.js'
+import {putRequest, deleteRequest} from './HelperFunctions/getAxiosConfig'
 
 export default function Comment (props) {
 
@@ -75,18 +74,16 @@ export default function Comment (props) {
         setComment({...comment, error : flag, value : userInput})
     }
 
+    function handleOnSuccessfulComment (data) {
+        setDisplayedComment(comment.value)
+        setEditando(false)
+        props.handleSnackbar(2)
+    }
+
     const updateComment = () => {
         const finalComment = comment
         if (!finalComment.error) {
-            let config = {
-                headers : {
-                    'Accept': 'application/json',
-                    'Content-Type': 'application/json',
-                    'Access-Token': sessionStorage.getItem('@portalmec/accessToken'),
-                    'Client': sessionStorage.getItem('@portalmec/clientToken'),
-                    'Uid': sessionStorage.getItem('@portalmec/uid'),
-                }
-            }
+
             let payload = {
                 "review" : {
                     "name":null,
@@ -96,35 +93,19 @@ export default function Comment (props) {
                     "review_ratings_attributes" : props.reviewRatings
                 }
             }
+            putRequest(`/learning_objects/${props.objectID}/reviews/`, payload, handleOnSuccessfulComment, (error) => {console.log(error)})
 
-            axios.put( (`${apiUrl}/learning_objects/` + props.objectID + '/reviews/' + props.reviewID),payload, config
-            ).then((response) => {
-                if ( response.headers['access-token'] ) {
-                    sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-                }
-                console.log(response)
-                setDisplayedComment(finalComment.value)
-                setEditando(false)
-                props.handleSnackbar(2)
-            }, (error) => {console.log(error)})
         }
     }
 
+    function handleSuccessDeleteComment (data) {
+        props.rerenderCallback()
+        props.handleSnackbar(3)
+    }
+
     const deleteComment = () => {
-        let config = {
-            headers : {
-                'Accept': 'application/json',
-                'Content-Type': 'application/json',
-                'Access-Token': sessionStorage.getItem('@portalmec/accessToken'),
-                'Client': sessionStorage.getItem('@portalmec/clientToken'),
-                'Uid': sessionStorage.getItem('@portalmec/uid'),
-            }
-        }
-        axios.delete( (`${apiUrl}/learning_objects/` + props.objectID + '/reviews/' + props.reviewID), config).then((response) => {
-            if ( response.headers['access-token'] ) {
-                sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-            }
-            props.rerenderCallback(); props.handleSnackbar(3)}, (error) => {console.log(error)})
+
+        deleteRequest(`/learning_objects/${props.objectID}/reviews/${props.reviewID}`, handleSuccessDeleteComment, (error) => {console.log(error)})
 
         toggleModal(false)
 
@@ -327,4 +308,3 @@ const AvatarDiv = styled.div`
         vertical-align : middle;
     }
 `
-
diff --git a/src/Components/ContactButtons/FollowButton.js b/src/Components/ContactButtons/FollowButton.js
index 4faddda7cfb471ce5d58f4e433f75d44b24b1171..5594fa6619ba288e50f997c8f449039a0f0b828b 100644
--- a/src/Components/ContactButtons/FollowButton.js
+++ b/src/Components/ContactButtons/FollowButton.js
@@ -20,32 +20,19 @@ import React from 'react'
 import PersonAddIcon from '@material-ui/icons/PersonAdd';
 import styled from 'styled-components'
 import Button from '@material-ui/core/Button';
-import axios from 'axios'
-import {apiUrl} from '../../env';
-import {getAxiosConfig} from '../HelperFunctions/getAxiosConfig'
+import {putRequest} from '../HelperFunctions/getAxiosConfig'
 
 export default function FollowButton (props) {
 
-    const handleFollow = (followerID) => {
-        const id = followerID
-        console.log('id: ', id)
-
-        let payload = {}
-        const header = getAxiosConfig()
-
-        axios.put((`${apiUrl}/users/` + id + '/follow'), payload, header).then(
-            (response) => {
-                if ( response.headers['access-token'] ) {
-                    sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-                }
-                console.log(response)
-                props.toggleFollowed()
-            },
-            (error) => {
-                  console.log(error)
-            }
-        )
+    function handleSuccess (data) {
+        props.toggleFollowed()
+    }
 
+    const handleFollow = (followerID) => {
+        if (followerID !== undefined) {
+            const url = `/users/${followerID}/follow/`
+            putRequest(url, {}, handleSuccess, (error) => {console.log(error)})
+        }
     }
 
     return (
@@ -62,24 +49,9 @@ export default function FollowButton (props) {
 export function NoIcon (props) {
 
     const handleFollow = (followerID) => {
-        const id = followerID
-        console.log('id: ', id)
-
-        if (id !== undefined) {
-            let payload = {}
-            const header = getAxiosConfig()
-
-            axios.put((`${apiUrl}/users/` + id + '/follow'), payload, header).then(
-                (response) => {
-                    if ( response.headers['access-token'] ) {
-                        sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-                    }
-                    console.log(response)
-                },
-                (error) => {
-                      console.log(error)
-                }
-            )
+        if (followerID !== undefined) {
+            const url = `/users/${followerID}/follow/`
+            putRequest(url, {}, (data) => {console.log(data)}, (error) => {console.log(error)})
         }
     }
 
diff --git a/src/Components/ContactButtons/FollowingButton.js b/src/Components/ContactButtons/FollowingButton.js
index 6fa7464a760885e617f37a1028aafc496b2b2610..b2d22f248597fa5fd15f9289f7ea538ec2a8b2b5 100644
--- a/src/Components/ContactButtons/FollowingButton.js
+++ b/src/Components/ContactButtons/FollowingButton.js
@@ -21,9 +21,7 @@ import styled from 'styled-components'
 import Button from '@material-ui/core/Button';
 import FollowingIcon from '../../img/how_to_reg-24px.png'
 import ModalConfirmarUnfollow from '../ModalConfirmarUnfollow.js'
-import axios from 'axios'
-import {apiUrl} from '../../env';
-import {getAxiosConfig} from '../HelperFunctions/getAxiosConfig'
+import {putRequest} from '../HelperFunctions/getAxiosConfig'
 
 export default function FollowingButton (props) {
 
@@ -38,26 +36,15 @@ export default function FollowingButton (props) {
         toggleModal(true)
     }
 
-    const handleUnfollowPartTwo = () => {
-        const id = unfollowID
-        console.log('id: ', id)
 
-        let payload = {}
-        const header = getAxiosConfig()
+    function handleSuccess (data) {
+        props.toggleFollowed()
+        toggleModal(false)
+    }
+    const handleUnfollowPartTwo = () => {
+        const url = `/users/${unfollowID}/follow/`
 
-        axios.put((`${apiUrl}/users/` + id + '/follow'), payload, header).then(
-            (response) => {
-                if ( response.headers['access-token'] ) {
-                    sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-                }
-                console.log(response)
-                props.toggleFollowed()
-                toggleModal(false)
-            },
-            (error) => {
-                  console.log(error)
-            }
-        )
+        putRequest(url, {}, handleSuccess, (error) => {console.log(error)})
     }
 
     return (
diff --git a/src/Components/ContactCard.js b/src/Components/ContactCard.js
index b1c26823e9ecb88f646b57c2f540bde466c93049..b5719d71e54a6eeb2ebaa30844b0a8e1ac6b10f3 100644
--- a/src/Components/ContactCard.js
+++ b/src/Components/ContactCard.js
@@ -71,18 +71,32 @@ export default function ImgMediaCard(props) {
                                 {
                                     followedBoolean ?
                                     (
-                                        [
-                                            <FollowingButton followedID={props.followerID} toggleFollowed={toggleFollowed}/>
-                                        ]
+                                        <React.Fragment>
+                                            <FollowingButton
+                                                followedID={props.followerID ? props.followerID : props.followedID}
+                                                toggleFollowed={toggleFollowed}/>
+
+                                            <Options
+                                                followableID={props.followerID ? props.followerID : props.followedID}
+                                                followed={followedBoolean}
+                                                toggleFollowed={toggleFollowed}/>
+                                        </React.Fragment>
                                     )
                                     :
                                     (
-                                        [
-                                            <FollowButton followerID={props.followerID} toggleFollowed={toggleFollowed}/>
-                                        ]
+                                        <React.Fragment>
+                                            <FollowButton
+                                                followerID={props.followedID ? props.followedID : props.followerID}
+                                                toggleFollowed={toggleFollowed}/>
+
+                                            <Options
+                                                followableID={props.followedID ? props.followedID : props.followerID}
+                                                followed={followedBoolean}
+                                                toggleFollowed={toggleFollowed}/>
+                                        </React.Fragment>
                                     )
                                 }
-                                <Options followableID={props.followerID} followed={followedBoolean}/>
+
                             </div>
                     </UserInfo>
                 </CardContent>
diff --git a/src/Components/ContactCardOptions.js b/src/Components/ContactCardOptions.js
index 99de8ca99da13b42dc6025a128d15f3c5a531473..deb12ba4e7a9c4a68785e59986ed3b85d3a05065 100644
--- a/src/Components/ContactCardOptions.js
+++ b/src/Components/ContactCardOptions.js
@@ -26,9 +26,7 @@ import MoreVertIcon from '@material-ui/icons/MoreVert';
 import OpenIcon from '@material-ui/icons/OpenInNew';
 import ReportIcon from '@material-ui/icons/Error';
 import PersonAddIcon from '@material-ui/icons/PersonAdd';
-import axios from 'axios'
-import {apiUrl} from '../env';
-import {getAxiosConfig} from './HelperFunctions/getAxiosConfig'
+import {putRequest} from './HelperFunctions/getAxiosConfig'
 import ReportModal from './ReportModal.js'
 import {Link} from 'react-router-dom'
 
@@ -43,34 +41,20 @@ export default function SimpleMenu(props) {
     function handleClose() {
         setAnchorEl(null);
     }
+
     const handleFollow = (followerID) => {
-        const id = followerID
-        console.log('id: ', id)
-
-        let payload = {}
-        const header = getAxiosConfig()
-        axios.put((`${apiUrl}/users/` + id + '/follow'), payload, header).then(
-            (response) => {
-                if ( response.headers['access-token'] ) {
-                    sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-                }
-                console.log(response)
-            },
-            (error) => {
-                console.log(error)
-            }
-        )
+
+        putRequest(`/users/${followerID}/follow`, {}, (data) => {
+            console.log(data);
+            props.toggleFollowed()
+        }, (error) => {console.log(error)})
+
+        handleClose();
     }
 
     const [reportModal, toggleReportModal] = useState(false)
     const handleModal = (value) => {
         toggleReportModal(value)
-        // {/*if (state.currentUser.id) {
-        //     toggleReportModal(!reportModal)
-        // }
-        // else {
-        //     toggleLoginModal(true)
-        // }*/}
     }
 
   return (
@@ -102,13 +86,13 @@ export default function SimpleMenu(props) {
             {
                 props.followed ?
                 (
-                    <StyledMenuItem onClick={() => {handleFollow(props.followableID);handleClose()}}>
+                    <StyledMenuItem onClick={() => {handleFollow(props.followableID)}}>
                         <ListItemIcon><ReportIcon /></ListItemIcon>Deixar de Seguir
                     </StyledMenuItem>
                 )
                 :
                 (
-                    <StyledMenuItem onClick={() => {handleFollow(props.followableID);handleClose()}}>
+                    <StyledMenuItem onClick={() => {handleFollow(props.followableID)}}>
                         <ListItemIcon><PersonAddIcon /></ListItemIcon>Seguir
                     </StyledMenuItem>
                 )
diff --git a/src/Components/ContactForm.js b/src/Components/ContactForm.js
index b00d2f3219e0c699e134a8455d7c41716e88442d..971001ebc2f52aad912ac0d9deb1791aafd68396 100644
--- a/src/Components/ContactForm.js
+++ b/src/Components/ContactForm.js
@@ -19,11 +19,7 @@ along with Plataforma Integrada MEC.  If not, see <http://www.gnu.org/licenses/>
 import React, { useState } from 'react';
 import styled from 'styled-components';
 import FormInput from "../Components/FormInput.js"
-import axios from 'axios'
-import {apiUrl} from '../env';
-
-
-
+import {postRequest} from './HelperFunctions/getAxiosConfig'
 
 const Button = styled.button`
 
@@ -187,27 +183,16 @@ const Button = styled.button`
       console.log(!(nome.dict.key && email.dict.key && mensagem.dict.key ))
       // Se não houver erro em nunhum dos campos E nenhum dos campos for vazio: a página faz o contato com o backend e os campos ficam em branco no formulário
       if (!(nome.dict.key || email.dict.key || mensagem.dict.key )) {
-
-        axios.post(`${apiUrl}/contacts`,
-            {
+          let payload = {
               contact : {
-                name: nome.dict.value,
-                email: email.dict.value,
-                message: mensagem.dict.value
+                  name: nome.dict.value,
+                  email: email.dict.value,
+                  message: mensagem.dict.value
               }
-
-        }
-        ).then()
-
-
-
-        limpaTudo();
-
-      }
-
-
-
+            }
+            postRequest(`/contacts`, payload, (data) => {limpaTudo()}, (error) => {console.log(error)})
   }
+}
 
 
 
diff --git a/src/Components/CriarColecaoForm.js b/src/Components/CriarColecaoForm.js
index 9eada322aa34fcccdb8736709414874c3f137bba..ea8c05070f21519b8594a13c03897d69481b2556 100644
--- a/src/Components/CriarColecaoForm.js
+++ b/src/Components/CriarColecaoForm.js
@@ -25,8 +25,7 @@ import RadioGroup from '@material-ui/core/RadioGroup';
 import FormControlLabel from '@material-ui/core/FormControlLabel';
 import FormControl from '@material-ui/core/FormControl';
 import TextField from '@material-ui/core/TextField';
-import axios from 'axios'
-import {apiUrl} from '../env';
+import {postRequest} from './HelperFunctions/getAxiosConfig'
 
 export default function CriarColecaoForm (props) {
     const {state} = useContext(Store)
@@ -59,6 +58,9 @@ export default function CriarColecaoForm (props) {
         })
     }
 
+    function handleSuccess (data) {
+        props.finalize(data.id)
+    }
     const formSubmit = (e) => {
         e.preventDefault()
 
@@ -66,7 +68,6 @@ export default function CriarColecaoForm (props) {
         const finalRadioValue = value === 'pública' ? 'public' : 'private'
         const finalColName = colName
 
-        console.log(finalRadioValue, finalColName.value)
         if(!(finalColName.key)) {
             let payload = {
                 "collection" : {
@@ -76,25 +77,8 @@ export default function CriarColecaoForm (props) {
                     "privacy" : finalRadioValue
                 }
             }
-            let config = {
-                headers : {
-                    'Accept': 'application/json',
-                    'Content-Type': 'application/json',
-                    'Access-Token': sessionStorage.getItem('@portalmec/accessToken'),
-                    'Client': sessionStorage.getItem('@portalmec/clientToken'),
-                    'Uid': sessionStorage.getItem('@portalmec/uid')
-                }
-            }
+            postRequest( `/collections/`, payload, handleSuccess, (error) =>{console.log(error)})
 
-            axios.post( (`${apiUrl}/collections/`), payload, config
-            ).then(
-                (response) => {
-                    console.log(response)
-                    if ( response.headers['access-token'] ) {
-                        sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-                    }
-                    props.finalize(response.data.id)
-                }, (error) =>{console.log(error)})
         }
     }
 
diff --git a/src/Components/EditarColecaoForm.js b/src/Components/EditarColecaoForm.js
index a078b1af975a3d44d2d517faccc8e38dd7cd75f9..9191ee7d51b329f0739e0b3d410baddf7437e7e4 100644
--- a/src/Components/EditarColecaoForm.js
+++ b/src/Components/EditarColecaoForm.js
@@ -25,31 +25,28 @@ import RadioGroup from '@material-ui/core/RadioGroup';
 import FormControlLabel from '@material-ui/core/FormControlLabel';
 import FormControl from '@material-ui/core/FormControl';
 import TextField from '@material-ui/core/TextField';
-import axios from 'axios'
-import {apiUrl} from '../env';
-import {getAxiosConfig} from './HelperFunctions/getAxiosConfig'
+import {getRequest, putRequest} from './HelperFunctions/getAxiosConfig'
 
 export default function EditarColecaoForm (props) {
     const {state} = useContext(Store)
 
+    function handleSuccessfulGet (data) {
+        setColName({key : false, value : data.name})
+        setValue( data.privacy === 'public' ? 'pública' : 'privada')
+        handleColDescription(data.description)
+    }
+
     useEffect(() => {
-        axios.get(`${apiUrl}/collections/${props.id}`).then(
-        (res) => {
-            setColName({key : false, value : res.data.name})
-            setValue( res.data.privacy === 'public' ? 'pública' : 'privada')
-            handleColDescription(res.data.description)
-        },
-        (err) => {console.log(err)}
-        )
+        getRequest(`/collections/${props.id}`, handleSuccessfulGet, (error) => {console.log(error)})
     }, [])
 
     const [value, setValue] = useState(-1);
 
     /*values are set according to backend complaint id*/
-    const [options] = useState([
+    const [options] = [
         {value : "pública", text :'Pública (Sua coleção estará disponível para todos)'},
         {value : "privada", text : 'Privada (Somente você poderá visualizar esta coleção)'}
-    ])
+    ]
 
     const handleChange = (event) => {
         setValue(event.target.value);
@@ -71,6 +68,9 @@ export default function EditarColecaoForm (props) {
         })
     }
 
+    function handleSuccessfulSubmit (data) {
+        props.finalize(data.id)
+    }
     const formSubmit = (e) => {
         e.preventDefault()
 
@@ -78,7 +78,6 @@ export default function EditarColecaoForm (props) {
         const finalRadioValue = value === 'pública' ? 'public' : 'private'
         const finalColName = colName
 
-        console.log(finalRadioValue, finalColName.value)
         if(!(finalColName.key)) {
             let payload = {
                 "collection" : {
@@ -88,17 +87,8 @@ export default function EditarColecaoForm (props) {
                     "privacy" : finalRadioValue
                 }
             }
-            let config = getAxiosConfig()
-
-            axios.put( (`${apiUrl}/collections/${props.id}`), payload, config
-            ).then(
-                (response) => {
-                    console.log(response)
-                    if ( response.headers['access-token'] ) {
-                        sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-                    }
-                    props.finalize(response.data.id)
-                }, (error) =>{console.log(error)})
+
+            putRequest(`/collections/${props.id}/`, payload, handleSuccessfulSubmit, (error) =>{console.log(error)})
         }
     }
 
diff --git a/src/Components/Firulas.js b/src/Components/Firulas.js
index 526ff7abdc28b1de5666ba4e573060edb5413902..6a368a11cf553166280ec8d85dd9ede03562e781 100644
--- a/src/Components/Firulas.js
+++ b/src/Components/Firulas.js
@@ -1,29 +1,19 @@
 import React, {useState} from 'react'
-import axios from 'axios'
-import {apiUrl} from '../env';
 import styled from 'styled-components'
 import Rating from '@material-ui/lab/Rating';
 import StarBorderIcon from '@material-ui/icons/StarBorder';
 import {LikeCounter, ButtonNoWidth} from '../Components/ResourceCardFunction.js'
 import FavoriteIcon from '@material-ui/icons/Favorite';
+import {putRequest} from './HelperFunctions/getAxiosConfig'
 
 export default function Firulas (props) {
     const [liked, setLiked] = useState(props.liked)
 
+    function handleSuccess (data) {
+        setLiked(!liked)
+    }
     const handleLike = () => {
-        let payload = {}
-        let config = {
-            headers : {
-                'Accept': 'application/json',
-                'Content-Type': 'application/json',
-                'Access-Token': sessionStorage.getItem('@portalmec/accessToken'),
-                'Client': sessionStorage.getItem('@portalmec/clientToken'),
-                'Uid': sessionStorage.getItem('@portalmec/uid'),
-            }
-        }
-
-        axios.put( (`${apiUrl}/learning_objects/` + props.recursoId + '/like'),payload, config
-    ).then( (response) => {setLiked(!liked)}, (error) => {console.log(error)})
+        putRequest(`/learning_objects/${props.recursoId}/like/`, {}, handleSuccess, (error) => {console.log(error)})
     }
 
     return (
diff --git a/src/Components/FollowCollectionButton.js b/src/Components/FollowCollectionButton.js
index cf7d7323ccd935207d581b0c0dd690faa621d130..be01ad44329cfe45b7ca167a4111d721cd8f7e7a 100644
--- a/src/Components/FollowCollectionButton.js
+++ b/src/Components/FollowCollectionButton.js
@@ -22,8 +22,7 @@ import CheckIcon from '@material-ui/icons/Check';
 import AddIcon from '@material-ui/icons/Add';
 import styled from 'styled-components';
 import SignUpModal from './SignUpModal.js';
-import axios from 'axios';
-import { apiUrl } from '../env';
+import {getRequest, putRequest} from './HelperFunctions/getAxiosConfig'
 
 export default function FollowCollectionButton(props) {
 	const [icon, setIcon] = useState(<AddIcon fontSize="large" />);
@@ -32,34 +31,21 @@ export default function FollowCollectionButton(props) {
 	const [sign_up_open, setSignUpOpen] = useState(false);
 	const [following, setFollowing] = useState(false); //user following collection
 
+    function handleSuccessGet (data) {
+        if(data)
+            data.map((e) => {
+                if (e["followable"]["id"] === Number(props.collection_id)){
+                    setVariant("contained");
+                    setButtonText("Seguindo");
+                    setIcon(<CheckIcon fontSize="large" />)
+                    setFollowing(true);
+                }
+                return undefined
+            })
+    }
 	useEffect(() => {
-		const url = apiUrl + '/users/' + props.user_id + '/following/Collection';
-		console.log("props: ", props);
-		axios({
-			method: 'get',
-			url: url,
-			headers: {
-				'Accept': 'application/json',
-				'Content-Type': 'application/json; charset=utf-8',
-				'access-token': sessionStorage.getItem('@portalmec/accessToken'),
-				'client': sessionStorage.getItem('@portalmec/clientToken'),
-				'uid': sessionStorage.getItem('@portalmec/uid'),
-				'If-None-Match': null
-			},
-		}).then(response => {
-			const data = [...response.data];
-			if(data)
-				data.map((e) => {
-					if (e["followable"]["id"] === Number(props.collection_id)){
-						setVariant("contained");
-						setButtonText("Seguindo");
-						setIcon(<CheckIcon fontSize="large" />)
-						setFollowing(true);
-					}
-					return undefined						
-				})
-			SaveNewHeaders(response)
-		})
+		const url = `/users/${props.user_id}/following/Collection`
+        getRequest(url, handleSuccessGet, (error) => console.log(error))
 	}, []);
 
 	//handleMouse{Enter, Leave} only do anything when user follows given collection:
@@ -79,70 +65,27 @@ export default function FollowCollectionButton(props) {
 		}
 	}
 
-	const SaveNewHeaders = (response) => {
-		if (
-			(response.headers['access-token'] === undefined || response.headers['access-token'] === null) &&
-			(response.headers.client === undefined || response.headers.client === null)
-		) {
-
-		} else {
-			sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-			sessionStorage.setItem('@portalmec/clientToken', response.headers.client)
-			console.log('saved')
-		}
-	}
-
+    function handleSuccessfulFollow (data) {
+        setVariant("contained");
+        setButtonText("Seguindo");
+        setIcon(<CheckIcon fontSize="large" />)
+        setFollowing(true);
+    }
+    function handleSuccessfulUnfollow (data) {
+        setVariant("outlined");
+        setButtonText("Seguir Coleção");
+        setIcon(<AddIcon fontSize="large" />);
+        setFollowing(false);
+    }
 	const handleClick = () => {
+        const url = `/collections/${props.collection_id}/follow`
+
 		if (!props.user_id)
 			setSignUpOpen(true);
 		else if (!following) {
-			const url = apiUrl + '/collections/' + props.collection_id + '/follow';
-			setVariant("contained");
-			setButtonText("Seguindo");
-			setIcon(<CheckIcon fontSize="large" />)
-			setFollowing(true);
-			axios({
-				method: 'put',
-				url: url,
-				headers: {
-					'Accept': 'application/json',
-					'Content-Type': 'application/json; charset=utf-8',
-					'access-token': sessionStorage.getItem('@portalmec/accessToken'),
-					'client': sessionStorage.getItem('@portalmec/clientToken'),
-					'uid': sessionStorage.getItem('@portalmec/uid'),
-					'If-None-Match': null
-				},
-			}).then(response => {
-				if (response.status === 201)
-					setFollowing(true);
-				else if (response.status === 200)
-					setFollowing(false);
-				SaveNewHeaders(response)
-			})
+            putRequest(url, {}, handleSuccessfulFollow, (error) => {console.log(error)})
 		} else {
-			const url = apiUrl + '/collections/' + props.collection_id + '/follow';
-			setVariant("outlined");
-			setButtonText("Seguir Coleção");
-			setIcon(<AddIcon fontSize="large" />);
-			setFollowing(false);
-			axios({
-				method: 'put',
-				url: url,
-				headers: {
-					'Accept': 'application/json',
-					'Content-Type': 'application/json; charset=utf-8',
-					'access-token': sessionStorage.getItem('@portalmec/accessToken'),
-					'client': sessionStorage.getItem('@portalmec/clientToken'),
-					'uid': sessionStorage.getItem('@portalmec/uid'),
-					'If-None-Match': null
-				},
-			}).then(response => {
-				if (response.status === 201)
-					setFollowing(true);
-				else if (response.status === 200)
-					setFollowing(false);
-				SaveNewHeaders(response)
-			})
+            putRequest(url, {}, handleSuccessfulUnfollow, (error) => {console.log(error)})
 		}
 	};
 
diff --git a/src/Components/GuardarModal.js b/src/Components/GuardarModal.js
index 8d4fc7ff48724e4bedf559b41cef9d8c555bf48b..3a231ac260b33ab13c140f17acb59693910e7817 100644
--- a/src/Components/GuardarModal.js
+++ b/src/Components/GuardarModal.js
@@ -23,14 +23,14 @@ import Backdrop from '@material-ui/core/Backdrop';
 import Fade from '@material-ui/core/Fade';
 import styled from 'styled-components'
 import {Store} from '../Store.js'
-import axios from 'axios'
-import {apiUrl, apiDomain} from '../env';
+import {apiDomain} from '../env';
 import CloseIcon from '@material-ui/icons/Close';
 import PublicIcon from '@material-ui/icons/Public';
 import LockIcon from '@material-ui/icons/Lock';
 import LoadingSpinner from './LoadingSpinner.js'
 import CriarColecaoForm from './CriarColecaoForm.js'
 import SnackbarComponent from './SnackbarComponent'
+import {getRequest, postRequest} from './HelperFunctions/getAxiosConfig'
 
 function CloseModalButton (props) {
     return (
@@ -40,60 +40,42 @@ function CloseModalButton (props) {
     )
 }
 
-function getConfig () {
-    let config = {
-        headers : {
-            'Accept': 'application/json',
-            'Content-Type': 'application/json',
-            'Access-Token': sessionStorage.getItem('@portalmec/accessToken'),
-            'Client': sessionStorage.getItem('@portalmec/clientToken'),
-            'Uid': sessionStorage.getItem('@portalmec/uid')
-        }
-    }
-    return config
-}
-
 export default function ReportModal (props) {
     const {state} = useContext(Store)
     const [collsArr, setcolls] = useState([])
     const [loading, toggleLoading] = useState(true)
     const [creatingCol, setCreating] = useState(false)
 
+
+    function handleSuccessGetCols (data) {
+        setcolls(data)
+        toggleLoading(false)
+    }
     const getCols = () => {
         if (collsArr.length === 0) {
             const id = state.currentUser.id
-            const config = getConfig()
-
-            axios.get( (`${apiUrl}/users/` + id + '/collections'), config
-            ).then( (response) => {
-                if ( response.headers['access-token'] ) {
-                    sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-                }
-                console.log(response)
-                setcolls(response.data)
-                toggleLoading(false)
-            }, (error) => {console.log('error')})
+
+            const url = `/users/${id}/collections/`
+
+            getRequest(url, handleSuccessGetCols, (error) => {console.log('error')})
         }
     }
 
+
+    function handleSuccessPostToCol (data) {
+        toggleSnackbar(true)
+        setCreating(false)
+        props.handleClose()
+    }
     const postToCol = (colId) => {
-        const config = getConfig()
+        const url = `/collections/${colId}/items`
         const payload = {
             "collection" : {
                 "items" : [ {"id":props.recursoId, "type":"LearningObject"} ]
             }
         }
+        postRequest( url, payload, handleSuccessPostToCol, (error) => {console.log(error)})
 
-        axios.post( (`${apiUrl}/collections/` + colId + '/items'), payload, config
-        ).then( (response) => {
-            if ( response.headers['access-token'] ) {
-                sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-            }
-            console.log(response)
-            toggleSnackbar(true)
-            setCreating(false)
-            props.handleClose()
-        }, (error) => {console.log(error)})
     }
 
     const [snackbarOpen, toggleSnackbar] = useState(false)
diff --git a/src/Components/Header.js b/src/Components/Header.js
index f721a372ad0f1794c5a0416bb7fea097b0e3f8b9..a0eb0c727f385d59854a25bc5aac5d91b41a1f11 100644
--- a/src/Components/Header.js
+++ b/src/Components/Header.js
@@ -17,8 +17,6 @@ You should have received a copy of the GNU Affero General Public License
 along with Plataforma Integrada MEC.  If not, see <http://www.gnu.org/licenses/>.*/
 
 import React, { useContext, useState, useEffect } from 'react'
-import axios from 'axios'
-import { apiUrl } from '../env'
 import MenuBar from './MenuBar'
 import SearchBar from './SearchBar'
 import SignUpModal from './SignUpModal'
@@ -29,6 +27,7 @@ import Snackbar from '@material-ui/core/Snackbar';
 import MuiAlert from '@material-ui/lab/Alert';
 import { useLocation } from 'react-router-dom'
 import MenuBarMobile from './MenuBarMobile.js'
+import {validateGoogleLoginToken} from './HelperFunctions/getAxiosConfig'
 
 //const StyledButton = styled(Button)`
 //    background : #ffa54c !important;
@@ -39,116 +38,90 @@ function Alert(props) {
 }
 
 
-export default function Header(props) {
-    const { state, dispatch } = useContext(Store)
-    const [signUpOpen, setSignUp] = useState(false)
-    const [loginOpen, setLogin] = useState(false)
-    const [successfulLoginOpen, handleSuccessfulLogin] = useState(false)
-    const [modalColaborar, setModalColaborar] = useState(false)
-
-    const validateToken = (config) => {
-        axios.get(`${apiUrl}/auth/validate_token/`, config).then(
-            (response) => {
-                console.log(response.data)
-                if (response.headers['access-token']) {
-                    sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-                }
-                dispatch({
-                    type: "USER_LOGGED_IN",
-                    userLoggedIn: !state.userIsLoggedIn,
-                    login: response.data.data
-                }
-                )
-
-                sessionStorage.setItem('@portalmec/id', response.data.data.id)
-                sessionStorage.setItem('@portalmec/username', response.data.data.name)
-                sessionStorage.setItem('@portalmec/uid', response.data.data.uid)
-
-
-                let headers = {
-                    client: response.headers.client,
-                    "access-token": response.headers['access-token'],
-                    "token-type": "Bearer",
-                    expiry: response.headers.expiry,
-                    uid: response.data.data.uid
-                }
-                sessionStorage.setItem('@portalmec/auth_headers', JSON.stringify(headers))
-            },
-            (err) => {
-                console.log(err)
-            }
-        )
-    }
-
-    useEffect(() => {
-        if (sessionStorage.getItem('@portalmec/auth_headers')) {
-            let config = { headers: JSON.parse(sessionStorage.getItem('@portalmec/auth_headers')) }
-
-            validateToken(config)
-        }
-    }, [])
-
-    useEffect(() => {
-        if (state.currentUser.askTeacherQuestion === true) {
-            dispatch({
-                type: "TOGGLE_MODAL_COLABORAR_PLATAFORMA",
-                modalColaborarPlataformaOpen: true
-            });
-        }
-    }, [state.currentUser.askTeacherQuestion])
-
-    const redirect = () => {
-        props.history.push('/')
-    }
-
-    let loc = useLocation()
-    useEffect(() => {
-        let query = new URLSearchParams(loc.search)
-
-        if (query.get("auth_token")) {
-            let config = {
-                headers: {
-                    "access-token": query.get("auth_token"),
-                    "client": query.get("client_id"),
-                    "uid": query.get("uid"),
-                    "expiry": query.get("expiry"),
-                    "token-type": 'Bearer'
-                }
-            }
-            validateToken(config)
-            redirect()
-        }
-
-    }, [loc])
-
-    const toggleSnackbar = (event, reason) => {
-        if (reason === 'clickaway') {
-            return;
-        }
-
-        handleSuccessfulLogin(false);
-    }
-
-    const handleSignUp = () => {
-        setSignUp(!signUpOpen)
-    }
-
-    const handleLogin = () => {
-        setLogin(!loginOpen)
-    }
-
-    const handleClickSearch = (open) => {
-        dispatch({
-            type: "HANDLE_SEARCH_BAR",
-            opened: !state.searchOpen
-        })
-    }
-
-    let windowWidth = window.innerWidth
-
-    return (
-        <React.Fragment>
-            {/*
+export default function Header(props){
+  const { state, dispatch } = useContext(Store)
+  const [signUpOpen, setSignUp] = useState(false)
+  const [loginOpen, setLogin] = useState(false)
+  const [successfulLoginOpen, handleSuccessfulLogin] = useState(false)
+  const [modalColaborar, setModalColaborar] = useState(false)
+
+  function handleSuccessValidateToken (data) {
+      dispatch ({
+          type: "USER_LOGGED_IN",
+          userLoggedIn: !state.userIsLoggedIn,
+          login: data.data
+          }
+      )
+  }
+
+/*  useEffect( () => {
+      if (sessionStorage.getItem('@portalmec/auth_headers')) {
+          let config = { headers : JSON.parse(sessionStorage.getItem('@portalmec/auth_headers'))}
+
+          validateToken(config, handleSuccessValidateToken, (error) => {console.log(error)})
+      }
+  }, [])*/
+
+  let loc = useLocation()
+  useEffect(() => {
+      let query = new URLSearchParams(loc.search)
+
+      if(query.get("auth_token")) {
+             let config = {
+                     headers : {
+                                "access-token" : query.get("auth_token"),
+                                "client" : query.get("client_id"),
+                                "uid" : query.get("uid"),
+                                "expiry" : query.get("expiry"),
+                                "token-type" : 'Bearer'
+                     }
+                  }
+           validateGoogleLoginToken(config, handleSuccessValidateToken, (error) => {console.log(error)})
+           redirect()
+      }
+  }, [loc])
+
+  useEffect ( () => {
+      if (state.currentUser.askTeacherQuestion === true) {
+          dispatch({
+            type: "TOGGLE_MODAL_COLABORAR_PLATAFORMA",
+            modalColaborarPlataformaOpen: true
+          });
+      }
+  }, [state.currentUser.askTeacherQuestion])
+
+  const redirect = () => {
+      props.history.push('/')
+  }
+
+  const toggleSnackbar = (event, reason) => {
+      if (reason === 'clickaway') {
+          return;
+      }
+
+      handleSuccessfulLogin(false);
+  }
+
+  const handleSignUp = () => {
+      setSignUp(!signUpOpen)
+  }
+
+  const handleLogin = () => {
+      setLogin(!loginOpen)
+  }
+
+  const handleClickSearch = (open) => {
+    dispatch({
+      type: "HANDLE_SEARCH_BAR",
+      opened: !state.searchOpen
+    })
+  }
+
+  let windowWidth = window.innerWidth
+
+  return (
+    <React.Fragment>
+       {/*
            windowWidth > 990 &&
            <AcessibilityBar/>
        */}
diff --git a/src/Components/FormValidationFunction.js b/src/Components/HelperFunctions/FormValidationFunction.js
similarity index 100%
rename from src/Components/FormValidationFunction.js
rename to src/Components/HelperFunctions/FormValidationFunction.js
diff --git a/src/Components/HelperFunctions/getAxiosConfig.js b/src/Components/HelperFunctions/getAxiosConfig.js
index 63a4ff6e53a5e6763eafdc8d0146f1c426c8ec00..7841d441bbf4c7085d8b965fe76f0d17863dbf99 100644
--- a/src/Components/HelperFunctions/getAxiosConfig.js
+++ b/src/Components/HelperFunctions/getAxiosConfig.js
@@ -1,14 +1,257 @@
+import {apiUrl} from '../../env.js'
+import axios from 'axios'
 
-export const getAxiosConfig = () => {
+export function getAxiosConfigFromJSON () {
     let config = {
-        headers : {
-            'Accept': 'application/json',
-            'Content-Type': 'application/json',
+        headers : JSON.parse(sessionStorage.getItem('@portalmec/auth_headers'))
+    }
+    return config
+}
+
+export function updateHeaders (newHeaders) {
+
+    sessionStorage.setItem('@portalmec/accessToken', newHeaders['access-token'])
+
+    let auth_headers = JSON.parse(sessionStorage.getItem('@portalmec/auth_headers'))
+    if (auth_headers) {
+        auth_headers['access-token'] = newHeaders['access-token']
+    }
+    else {
+        auth_headers = {
+            client: newHeaders.client,
+            "access-token": newHeaders['access-token'],
+            uid: newHeaders.uid,
+            expiry: newHeaders.expiry,
+            "token-type": "Bearer"
         }
     }
-    config.headers["Access-Token"] = sessionStorage.getItem('@portalmec/accessToken');
-    config.headers.Client = sessionStorage.getItem('@portalmec/clientToken')
-    config.headers.Uid = sessionStorage.getItem('@portalmec/uid')
+    sessionStorage.setItem('@portalmec/auth_headers', JSON.stringify(auth_headers))
+}
+
+function fetchHeaders () {
+    let auth_headers = JSON.parse(sessionStorage.getItem('@portalmec/auth_headers'))
+
+    if (auth_headers) {
+        const myHeaders = new Headers(auth_headers)
+        return myHeaders
+    }
+    else {
+        return {}
+    }
+}
+
+function checkPreviousTokens (new_token) {
+
+    let prev_tokens = JSON.parse(sessionStorage.getItem('@portalmec/tokens'))
+
+    if (prev_tokens) {
+        if (!prev_tokens.hasOwnProperty(new_token)) {
+            prev_tokens[new_token] = 1
+            sessionStorage.setItem('@portalmec/tokens', JSON.stringify(prev_tokens))
+            return true
+        }
+        else {
+            return false
+        }
+    }
+    else {
+        let tokens = {}
+        tokens[new_token] = 1
+        sessionStorage.setItem('@portalmec/tokens', JSON.stringify(tokens))
+        return true
+    }
+
+}
+
+function updateAccessToken (newAccessToken) {
+
+    if (checkPreviousTokens(newAccessToken)) {
+
+        sessionStorage.setItem('@portalmec/accessToken', newAccessToken)
+
+        let auth_headers = JSON.parse(sessionStorage.getItem('@portalmec/auth_headers'))
+
+        if (auth_headers) {
+            auth_headers['access-token'] = newAccessToken
+        }
+
+        sessionStorage.setItem('@portalmec/auth_headers', JSON.stringify(auth_headers))
+    }
+}
+
+export const getRequest = (url, onSuccess, onError) => {
+    fetch((`${apiUrl}${url}`), {
+        headers : fetchHeaders()
+    })
+        .then(response => {
+            if (response.headers.has('access-token')) {
+                updateAccessToken(response.headers.get('access-token'))
+            }
+            return response.json().catch(err => {
+                return {};
+            })
+        })
+        .then(data => {
+            console.log(data)
+            onSuccess(data)
+        })
+        .catch(error => {
+            onError(error)
+        })
+}
+
+export const deleteRequest = (url, onSuccess, onError) => {
+    fetch((`${apiUrl}${url}`), {
+        method : 'DELETE',
+        headers : fetchHeaders()
+    })
+        .then(response => {
+            if (response.headers.has('access-token')) {
+                updateAccessToken(response.headers.get('access-token'))
+            }
+            return response.json().catch(err => {
+                return {};
+            })
+        })
+        .then(data => {
+            console.log(data)
+            onSuccess(data)
+        })
+        .catch(error => {
+            onError(error)
+        })
+}
+
+export const putRequest = (url, payload, onSuccess, onError) => {
+    let newHeaders = fetchHeaders()
+    if (payload instanceof FormData) {
+        newHeaders.append('Content-Type', 'multipart/form-data')
+    }
+    else {
+        newHeaders.append('Content-Type', 'application/json')
+    }
+
+    fetch((`${apiUrl}${url}`), {
+        method : 'PUT',
+        headers : newHeaders,
+        body: payload instanceof FormData ? payload : JSON.stringify(payload)
+    })
+        .then(response => {
+            if (response.headers.has('access-token')) {
+                updateAccessToken(response.headers.get('access-token'))
+            }
+            return response.json().catch(err => {
+                return {};
+            })
+        })
+        .then(data => {
+            console.log(data)
+            onSuccess(data)
+        })
+        .catch(error => {
+            onError(error)
+        })
+}
+
+export const postRequest = (url, payload, onSuccess, onError) => {
+    let newHeaders = fetchHeaders()
+    if (payload instanceof FormData) {
+        newHeaders.append('Content-Type', 'multipart/form-data')
+    }
+    else {
+        newHeaders.append('Content-Type', 'application/json')
+    }
+
+    fetch((`${apiUrl}${url}`), {
+        method : 'POST',
+        headers : newHeaders,
+        body: payload instanceof FormData ? payload : JSON.stringify(payload)
+    })
+        .then(response => {
+            if (response.headers.has('access-token')) {
+                updateAccessToken(response.headers.get('access-token'))
+            }
+            return response.json().catch(err => {
+                return {};
+            })
+        })
+        .then(data => {
+            console.log(data)
+            onSuccess(data)
+        })
+        .catch(error => {
+            onError(error)
+        })
+}
+
+export const fetchAllRequest = (urls, onSuccess, onError) => {
+    Promise.all( urls.map( url => fetch(`${apiUrl}${url}`,  {
+        headers : fetchHeaders()
+    }))).then( (responses) => {
+        for(let res of responses) {
+            console.log(res)
+            if (res.headers.has('access-token') && res.status !== 304) {
+                console.log(res)
+                updateAccessToken(res.headers.get('access-token'))
+            }
+        }
+        return Promise.all(responses.map( (response) => response.json().catch(err => {
+            return {};
+        })))
+    }).then( (data) => {
+        onSuccess(data)
+    }).catch((error) => {
+        onError(error)
+    })
+}
+
+export const validateGoogleLoginToken = (config, onSuccess, onError) => {
+    axios.get( (`${apiUrl}/auth/validate_token/`), config ).then(
+        (response) => {
+
+            if ( response.headers['access-token'] ) {
+                updateHeaders(response.headers)
+            }
+
+            onSuccess(response.data)
+        },
+        (error) => {
+            onError(error)
+        }
+    )
+}
+
+export const authentication = (url, payload, onSuccess, onError) => {
+    let formData = new FormData()
+    for (const [key, value] of Object.entries(payload)) {
+        formData.append(`${key}`,value);
+    }
+
+    fetch((`${apiUrl}${url}`), {
+        method : 'POST',
+        body: formData
+    })
+        .then(response => {
+            const auth_headers = {
+                client: response.headers.get('client'),
+                "access-token": response.headers.get('access-token'),
+                uid: response.headers.get('uid'),
+                expiry: response.headers.get('expiry'),
+                "token-type": "Bearer"
+            }
+
+            sessionStorage.setItem('@portalmec/auth_headers', JSON.stringify(auth_headers))
+
+            return response.json().catch(err => {
+                return {};
+            })
+        })
+        .then(data => {
+            console.log(data)
+            onSuccess(data)
+        })
+        .catch(error => {
+            onError(error)
+        })
 
-    return config
 }
diff --git a/src/Components/IframeOverlay/DrawerContent.js b/src/Components/IframeOverlay/DrawerContent.js
index cd4772a6d1ab6c33b1b113420ae6337ebb8c1588..38907d688fab7632769096ecf825394c7c817573 100644
--- a/src/Components/IframeOverlay/DrawerContent.js
+++ b/src/Components/IframeOverlay/DrawerContent.js
@@ -1,25 +1,24 @@
 import React, { useState, useEffect } from 'react';
 import styled from 'styled-components';
-import axios from 'axios';
 import Grid from '@material-ui/core/Grid';
 import SearchInput from './SearchInput.js';
 import ResourceCard from './ResourceCard.js';
-import { apiUrl } from '../../env';
 import SmallFooter from './SmallFooter.js';
 import CircularProgress from '@material-ui/core/CircularProgress';
+import {getRequest} from '../HelperFunctions/getAxiosConfig'
 
 export default function DrawerContent(props) {
 	const [resources, setResources] = useState([]);
 	const [isLoading, setIsLoading] = useState(false); 
 
+    function handleSuccess(data) {
+        setResources(data)
+    }
 	const search = (query) => {
-		setIsLoading(true);
-		axios.get(`${apiUrl}/search?
-			page=0&results_per_page=12&query=${query}&search_class=LearningObject`)
-			.then(res => {
-				setResources(res.data);
-				setIsLoading(false);
-			});
+        const url = `/search?
+			page=0&results_per_page=5&query=${query}&search_class=LearningObject`
+
+        getRequest(url, handleSuccess, (error) => {console.log(error)})
 	}
 
 	useEffect(() => {
@@ -38,7 +37,7 @@ export default function DrawerContent(props) {
 		>
 			<Grid item xs={11}>
 				<SearchInput stdin={props.tag} search={search}/>
-			</Grid> 
+			</Grid>
 			<Grid item xs={11}>
 				<Description>
 					Recursos Relacionados na Plataforma MEC:
diff --git a/src/Components/IllegalContentModal.js b/src/Components/IllegalContentModal.js
index 135270c2fbbb96658225e24962830f5f6e1c1c50..976bb5d8728791502ced2db51534bf6b4cc5b703 100644
--- a/src/Components/IllegalContentModal.js
+++ b/src/Components/IllegalContentModal.js
@@ -81,24 +81,12 @@ const StyledDivContainer = styled.div`
 export default function IllegalContentModal (props) {
     const {state} = useContext(Store)
 
-    // const func = () => {
-    //     let name = ''
-    //     axios.get(`${apiUrl}/users/:id`,{
-    //
-    //     }
-    //     ).then ( (response) => {
-    //         name = response.name
-    //     }, (error) => {
-    //         console.log(':(')
-    //     })
-    // }
-
     return (
         <StyledModal
         aria-labelledby="transition-modal-title"
         aria-describedby="transition-modal-description"
         open={props.open}
-         
+
         centered="true"
         onClose={props.handleClose}
         closeAfterTransition
diff --git a/src/Components/LoginContainerFunction.js b/src/Components/LoginContainerFunction.js
index 33b7ff15dd065bfb9df5f1beed06701286107f7f..8534da0ad3bbe1154612b62b1eeff24f4f26cbfc 100644
--- a/src/Components/LoginContainerFunction.js
+++ b/src/Components/LoginContainerFunction.js
@@ -25,7 +25,7 @@ import {device} from './device.js'
 import LabeledCheckbox from './Checkbox.js'
 import FormInput from "./FormInput.js"
 import GoogleLogo from "../img/logo_google.svg"
-import ValidateUserInput from '../Components/FormValidationFunction.js'
+import ValidateUserInput from './HelperFunctions/FormValidationFunction.js'
 import {Link} from 'react-router-dom'
 import {apiUrl} from '../env.js'
 
diff --git a/src/Components/LoginModal.js b/src/Components/LoginModal.js
index 0cba39ecc64cdad3bd1ccab3fdd42bd012c16b26..b18ab1cc252bd0598aae745c41997bd67678c41d 100644
--- a/src/Components/LoginModal.js
+++ b/src/Components/LoginModal.js
@@ -23,10 +23,10 @@ import Zoom from '@material-ui/core/Fade';
 import styled from 'styled-components'
 import LoginContainer from './LoginContainerFunction.js'
 import {Store} from '../Store.js'
-import axios from 'axios'
-import {apiUrl} from '../env';
 import Snackbar from '@material-ui/core/Snackbar';
 import MuiAlert from '@material-ui/lab/Alert';
+import {authentication} from './HelperFunctions/getAxiosConfig'
+
 const StyledLogin = styled(Modal)`
     margin : 0 !important;
     margin-left : 0 !important;
@@ -55,45 +55,36 @@ export default function LoginModal (props){
         handleSnackbar(false);
     }
 
+    function renameKeys (obj) {
+        if (obj.avatar_file_name) {
+            Object.defineProperty(obj, 'avatar',
+                Object.getOwnPropertyDescriptor(obj, 'avatar_file_name'));
+            delete obj['avatar_file_name'];
+        }
+    }
+
+    function handleSuccess (data) {
+        renameKeys(data.data)
+        dispatch ({
+            type: "USER_LOGGED_IN",
+            userLoggedIn: !state.userIsLoggedIn,
+            login: data.data
+            }
+        )
+        props.handleClose();
+        props.openSnackbar();
+    }
+    function handleError (error) {
+        handleSnackbar(true)
+    }
     const handleLoginInfo = (login) => {
-        axios.post(`${apiUrl}/auth/sign_in`,
-            {
+        const url = `/auth/sign_in`
+        const payload = {
             email : login.email,
             password : login.senha
         }
-        ).then( (response) => {
-            console.log(response)
-            dispatch ({
-                type: "USER_LOGGED_IN",
-                userLoggedIn: !state.userIsLoggedIn,
-                login: response.data.data
-                }
-            )
-            sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-            sessionStorage.setItem('@portalmec/clientToken', response.headers.client)
-            sessionStorage.setItem('@portalmec/id', response.data.data.id)
-            sessionStorage.setItem('@portalmec/username', response.data.data.name)
-            sessionStorage.setItem('@portalmec/uid', response.data.data.uid)
-
-            let headers = {
-                client:response.headers.client,
-                "access-token":response.headers['access-token'],
-                "token-type": "Bearer",
-                expiry:response.headers.expiry,
-                uid:response.data.data.uid
-            }
-            sessionStorage.setItem('@portalmec/auth_headers', JSON.stringify(headers))
-
-            if (login.checkboxChecked) {
-                localStorage.setItem('@portalmec/auth_headers', JSON.stringify(headers))
-            }
 
-            props.handleClose();
-            props.openSnackbar();
-            }, (error) => {
-                handleSnackbar(true)
-            }
-        )
+        authentication(url, payload, handleSuccess, handleError)
     }
 
 
diff --git a/src/Components/MenuList.js b/src/Components/MenuList.js
index 6ec3f5c91f5c11b2323c92583da9f302f2cd7926..643b4b04a72b14cda85a328c8f14ee572a13be83 100644
--- a/src/Components/MenuList.js
+++ b/src/Components/MenuList.js
@@ -26,9 +26,8 @@ import ExitToAppIcon from '@material-ui/icons/ExitToApp';
 import { Store } from '../Store';
 import Profile from '../img/default_profile0.png'
 import styled from 'styled-components'
-import {apiDomain, apiUrl} from '../env.js'
-import {getAxiosConfig} from './HelperFunctions/getAxiosConfig'
-import axios from 'axios'
+import {apiDomain} from '../env.js'
+import {deleteRequest} from './HelperFunctions/getAxiosConfig'
 
 
 const OverrideButton = styled(Button)`
@@ -47,30 +46,15 @@ export default function MenuList(props) {
     setAnchorEl(null);
   };
 
+  function handleSuccessSignOut (data) {
+      dispatch( {
+          type: 'USER_LOGGED_OUT',
+          userLoggedOut: !state.userIsLoggedIn,
+      })
+  }
   const handleLogout = () => {
-      let config = getAxiosConfig()
-      axios.delete(`${apiUrl}/auth/sign_out`, config).then(
-          () => {
-
-          localStorage.removeItem('@portalmec/username');
-          sessionStorage.removeItem('@portalmec/uid');
-          sessionStorage.removeItem('@portalmec/senha');
-          dispatch( {
-              type: 'USER_LOGGED_OUT',
-              userLoggedOut: !state.userIsLoggedIn,
-              login: {
-                  username : '',
-                  email : '',
-                  accessToken : '',
-                  client : ''
-              }
-          })
-      },
-      (err) => {
-          console.log(err)
-      }
-      )
-
+      const url = `/auth/sign_out`
+      deleteRequest(url, handleSuccessSignOut, (error) => {console.log(error)})
   }
 
   return (
@@ -84,13 +68,13 @@ export default function MenuList(props) {
       >
         <div style={{borderRadius: "50%", border: "2px solid #fff", background: "#fff", overflow: "hidden", maxWidth : "50px", maxHeight : "50px"}}>
             {
-                state.currentUser.avatar_file_name === '' || state.currentUser.avatar_file_name === null ?
+                state.currentUser.avatar === '' || state.currentUser.avatar === null || state.currentUser.avatar === undefined ?
                 (
 
                     <img src={Profile} alt={'user avatar'} style={{width:"100%", height:"100%", verticalAlign : "middle", marginLeft : "0"}}/>
                 ):
                 (
-                    <img src={apiDomain + state.currentUser.avatar_file_name} alt={'user avatar'} style={{width:"100%", height:"100%", verticalAlign : "middle", marginLeft : "0"}}/>
+                    <img src={apiDomain + state.currentUser.avatar} alt={'user avatar'} style={{width:"100%", height:"100%", verticalAlign : "middle", marginLeft : "0"}}/>
                 )
             }
         </div>
diff --git a/src/Components/MobileDrawerMenu.js b/src/Components/MobileDrawerMenu.js
index 9670234e882becc1d11317e8bbf4b3d8f1e763fc..f872b4583c995b8ec6da6dad2d1d1c62b13d4b14 100644
--- a/src/Components/MobileDrawerMenu.js
+++ b/src/Components/MobileDrawerMenu.js
@@ -36,10 +36,9 @@ import HistoryIcon from '@material-ui/icons/History';
 import FavoriteBorderIcon from '@material-ui/icons/FavoriteBorder';
 import FolderOpenIcon from '@material-ui/icons/FolderOpen';
 import SettingsIcon from '@material-ui/icons/Settings';
-import {apiDomain, apiUrl} from '../env.js';
+import {apiDomain} from '../env.js'
+import {deleteRequest} from './HelperFunctions/getAxiosConfig'
 import SearchIcon from '@material-ui/icons/Search';
-import {getAxiosConfig} from './HelperFunctions/getAxiosConfig'
-import axios from 'axios'
 
 export default function MobileDrawerMenu (props) {
     const {state, dispatch} = useContext(Store)
@@ -60,11 +59,11 @@ export default function MobileDrawerMenu (props) {
     };
 
     const getUserAvatar = ()  => {
-        if (state.currentUser.avatar_file_name === '' || state.currentUser.avatar_file_name == null) {
+        if (state.currentUser.avatar === '' || state.currentUser.avatar == null) {
             return DefaultAvatar
         }
         else {
-            return apiDomain + state.currentUser.avatar_file_name
+            return apiDomain + state.currentUser.avatar
         }
     }
 
@@ -77,30 +76,16 @@ export default function MobileDrawerMenu (props) {
         { name: "Coleções", href: "/perfil", icon : <FolderOpenIcon/>, value : '3'},
     ]
 
-    // {/*dispatches log out actions to Store.js*/}
-    const handleLogout = () => {
-        let config = getAxiosConfig()
-        axios.delete(`${apiUrl}/auth/sign_out`, config).then(
-            (res) => {
 
-            localStorage.removeItem('@portalmec/username');
-            sessionStorage.removeItem('@portalmec/uid');
-            sessionStorage.removeItem('@portalmec/senha');
-            dispatch( {
-                type: 'USER_LOGGED_OUT',
-                userLoggedOut: !state.userIsLoggedIn,
-                login: {
-                    username : '',
-                    email : '',
-                    accessToken : '',
-                    client : ''
-                }
-            })
-        },
-        (err) => {
-            console.log(err)
-        }
-        )
+    function handleSuccessSignOut (data) {
+        dispatch( {
+            type: 'USER_LOGGED_OUT',
+            userLoggedOut: !state.userIsLoggedIn,
+        })
+    }
+    const handleLogout = () => {
+        const url = `/auth/sign_out`
+        deleteRequest(url, handleSuccessSignOut, (error) => {console.log(error)})
     }
 
     return (
diff --git a/src/Components/ModalAlterarAvatar/ComponentAlterarAvatar.js b/src/Components/ModalAlterarAvatar/ComponentAlterarAvatar.js
index 4895cf29c01b5fde32ebeb1f1519b4b25f6a2036..8936af0a751bcd2d139c08bf631e489415688a24 100644
--- a/src/Components/ModalAlterarAvatar/ComponentAlterarAvatar.js
+++ b/src/Components/ModalAlterarAvatar/ComponentAlterarAvatar.js
@@ -20,12 +20,11 @@ import React, {useContext, useState} from 'react';
 import { Button } from '@material-ui/core';
 import styled from 'styled-components'
 import {Store} from '../../Store.js'
-import axios from 'axios'
-import {apiUrl, apiDomain} from '../../env';
+import {apiDomain} from '../../env';
 import CloseIcon from '@material-ui/icons/Close';
 import Profile from '../../img/default_profile0.png'
 import Cropper from '../Cropper.js'
-
+import {putRequest} from '../HelperFunctions/getAxiosConfig'
 
 function ChooseImage (props) {
     return (
@@ -65,21 +64,6 @@ function ChooseImage (props) {
     )
 }
 
-const GetHeaderConfig = () => {
-
-    let config = {
-        headers : {
-            'Accept': 'application/json',
-            'Content-Type': 'application/json',
-            'Access-Token': sessionStorage.getItem('@portalmec/accessToken'),
-            'Client': sessionStorage.getItem('@portalmec/clientToken'),
-            'Uid': sessionStorage.getItem('@portalmec/uid'),
-        }
-    }
-    // {/*'Host': 'api.portalmec.c3sl.ufpr.br',
-    // 'Cookie': ''*/}
-    return config
-}
 
 export default function ComponentAlterarAvatar (props) {
     const {state, dispatch} = useContext(Store)
@@ -103,28 +87,23 @@ export default function ComponentAlterarAvatar (props) {
         aspect: 1
     });
 
+    function handleSuccess(data) {
+        const target = state.currentUser
+        const source = {userAvatar : data.avatar}
+        dispatch({
+            type : 'USER_CHANGED_COVER',
+            currUser : Object.assign(target, source)
+        })
+    }
+
     const completeSelection = () => {
-        console.log(newAvatar)
+        const url = `/users/${props.id}`
+
         //newAvatar is a base64 encoded image file
         let fdAvatar = new FormData()
         fdAvatar.set('user[avatar]', newAvatar)
 
-        axios.put( (`${apiUrl}/users/` + props.id ),
-            fdAvatar,
-            GetHeaderConfig()
-        ).then( (response) => {
-            console.log(response)
-            if ( response.headers['access-token'] ) {
-                sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-            }
-            const target = state.currentUser
-            const source = {userAvatar : response.data.avatar}
-            dispatch({
-                type : 'USER_CHANGED_COVER',
-                currUser : Object.assign(target, source)
-            })
-        }, (error) => {console.log(error)}
-        )
+        putRequest(url, fdAvatar, handleSuccess, (error) => {console.log(error)})
     }
 
     return (
diff --git a/src/Components/ModalAlterarCover/ComponentAlterarCover.js b/src/Components/ModalAlterarCover/ComponentAlterarCover.js
index caf408d482af065ceeba81a1e601efdf5544a602..99a5f5493eca3735ae00b5a2431934ed5b9f8201 100644
--- a/src/Components/ModalAlterarCover/ComponentAlterarCover.js
+++ b/src/Components/ModalAlterarCover/ComponentAlterarCover.js
@@ -20,27 +20,9 @@ import React, {useContext, useState} from 'react';
 import { Button } from '@material-ui/core';
 import styled from 'styled-components'
 import {Store} from '../../Store.js'
-import axios from 'axios'
-import {apiUrl} from '../../env';
 import CloseIcon from '@material-ui/icons/Close';
 import Cropper from '../Cropper.js'
-
-
-const GetHeaderConfig = () => {
-
-    let config = {
-        headers : {
-            'Accept': 'application/json',
-            'Content-Type': 'application/json',
-            'Access-Token': sessionStorage.getItem('@portalmec/accessToken'),
-            'Client': sessionStorage.getItem('@portalmec/clientToken'),
-            'Uid': sessionStorage.getItem('@portalmec/uid'),
-        }
-    }
-    // {/*'Host': 'api.portalmec.c3sl.ufpr.br',
-    // 'Cookie': ''*/}
-    return config
-}
+import {putRequest} from '../HelperFunctions/getAxiosConfig'
 
 export default function ComponentAlterarCover (props) {
     const {state, dispatch} = useContext(Store)
@@ -55,27 +37,23 @@ export default function ComponentAlterarCover (props) {
         aspect: 16 / 9
     });
 
+    function handleSuccess (data) {
+        const target = state.currentUser
+        const source = {userCover : data.cover}
+        dispatch({
+            type : 'USER_CHANGED_COVER',
+            currUser : Object.assign(target, source)
+        })
+    }
+
     const completeSelection = () => {
-        console.log(newCover)
+        const url = `/users/${props.id}`
+
         //newCover is a base64 encoded image file.
         let fdCover = new FormData()
         fdCover.set('user[cover]', newCover)
 
-        axios.put( (`${apiUrl}/users/` + props.id ),
-            fdCover,
-            GetHeaderConfig()
-        ).then( (response) => {
-            if ( response.headers['access-token'] ) {
-                sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-            }
-            const target = state.currentUser
-            const source = {userCover : response.data.cover}
-            dispatch({
-                type : 'USER_CHANGED_COVER',
-                currUser : Object.assign(target, source)
-            })
-        }, (error) => {console.log(error)}
-        )
+        putRequest(url, fdCover, handleSuccess, (error) => {console.log(error)})
     }
 
     return (
diff --git a/src/Components/ModalConfirmarCuradoria.js b/src/Components/ModalConfirmarCuradoria.js
index b654338cadf3dd573689ce0102179377ca6282e6..4687b1876be5b3ae5376901a97eb2e00aca3df66 100644
--- a/src/Components/ModalConfirmarCuradoria.js
+++ b/src/Components/ModalConfirmarCuradoria.js
@@ -22,10 +22,8 @@ import Modal from '@material-ui/core/Modal';
 import Backdrop from '@material-ui/core/Backdrop';
 import Fade from '@material-ui/core/Fade';
 import styled from 'styled-components'
-import axios from 'axios'
-import {apiUrl} from '../env';
 import CloseModalButton from './CloseModalButton'
-import {getAxiosConfig} from './HelperFunctions/getAxiosConfig'
+import {postRequest} from './HelperFunctions/getAxiosConfig'
 
 export default function ModalConfirmarCuradoriaOpen (props) {
 
@@ -42,8 +40,11 @@ export default function ModalConfirmarCuradoriaOpen (props) {
         return newArr
     }
 
+    function handleSuccess (data) {
+        props.finalizeCuratorshipFlow()
+    }
     const handleConfirmation = () => {
-        let config = getAxiosConfig()
+        const url = `/submissions/${props.recursoId}/answer`
 
         let payload = {
             "submission" : {
@@ -51,16 +52,7 @@ export default function ModalConfirmarCuradoriaOpen (props) {
                 "answers" : transformReportCriteria(props.reportCriteria)
             }
         }
-
-        axios.post( (`${apiUrl}/submissions/` + props.recursoId + '/answer'), payload, config).then(
-            (response) => {
-                if ( response.headers['access-token'] ) {
-                    sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-                }
-                console.log(response.data)
-                props.finalizeCuratorshipFlow()
-            }, (error) => {console.log(error)}
-        )
+        postRequest(url, payload, handleSuccess, (error) => {console.log(error)})
     }
 
     return (
diff --git a/src/Components/ModalExcluirColecao.js b/src/Components/ModalExcluirColecao.js
index 914aa74f2ce58c00699144802eb7c364cbc11faa..879112aebb46690447dcc1b3cdecb62e90adbbff 100644
--- a/src/Components/ModalExcluirColecao.js
+++ b/src/Components/ModalExcluirColecao.js
@@ -21,28 +21,22 @@ import Modal from '@material-ui/core/Modal';
 import Backdrop from '@material-ui/core/Backdrop';
 import Fade from '@material-ui/core/Fade';
 import styled from 'styled-components'
-import axios from 'axios'
-import {apiUrl} from '../env';
 import GreyButton from './GreyButton.js'
 import PurpleButton from './PurpleButton.js'
-import {getAxiosConfig} from '../Components/HelperFunctions/getAxiosConfig'
 import SnackbarComponent from './SnackbarComponent'
+import {deleteRequest} from './HelperFunctions/getAxiosConfig'
 
 export default function ModalExcluirColecao (props) {
     const [snackbarOpen, toggleSnackbar] = useState(false)
 
+    function handleDeleteSuccess (data) {
+        toggleSnackbar(true)
+        props.handleClose()
+    }
     const handleDelete = () => {
-        let config = getAxiosConfig()
-
-        axios.delete( (`${apiUrl}/collections/` + props.id), config
-        ).then( (response) => {
-            if ( response.headers['access-token'] ) {
-                sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-            }
-            console.log(response)
-            toggleSnackbar(true)
-            props.handleClose()
-        }, (error) => {console.log(error);})
+        const url = `/collections/${props.id}`
+
+        deleteRequest(url, handleDeleteSuccess, (error) => {console.log(error)})
     }
 
     return (
diff --git a/src/Components/Notifications.js b/src/Components/Notifications.js
index d8df9e70914342207aa0ceba0cc989c54e75aa86..cf8a2f055f3fc17d46b9ba856d05c3bfa96b7b8d 100644
--- a/src/Components/Notifications.js
+++ b/src/Components/Notifications.js
@@ -21,10 +21,9 @@ import { Button } from '@material-ui/core';
 import Badge from '@material-ui/core/Badge';
 import styled from 'styled-components'
 import Menu from '@material-ui/core/Menu';
-import {apiDomain, apiUrl} from '../env.js'
-import axios from 'axios'
+import {apiDomain} from '../env.js'
 import ActivityListItem from './ActivityListItem.js'
-import {getAxiosConfig} from './HelperFunctions/getAxiosConfig.js'
+import {getRequest} from './HelperFunctions/getAxiosConfig.js'
 import { withStyles } from '@material-ui/core/styles';
 import {Link} from 'react-router-dom'
 
@@ -77,27 +76,23 @@ export default function Notification (props) {
     const [notifications, setNotifications] = useState([]);
     // eslint-disable-next-line
     const [notificatonsLength, setLength] = useState(0);
-    useEffect(() => {
 
-        setTimeout(() => {
-            let config = getAxiosConfig()
-            axios.get(`${apiUrl}/feed?offset=0&limit=30`, config)
-            .then( (response) => {
-                if ( response.headers['access-token'] ) {
-                    sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-                }
+    function handleAxiosSuccess (data) {
+        setNotifications(data)
+        setLength(data.length)
+    }
+
+    function handleAxiosError (error) {
+        console.log('error getNotifications')
+        console.log(error)
+    }
+
+
+    useEffect(() => {
+        getRequest('/feed?offset=0&limit=30', handleAxiosSuccess, handleAxiosError)
+    }, [])
 
-                console.log('atividades response: ', response)
-                setNotifications(response.data)
-                setLength(response.data.length)
 
-                },
-                (error) => {
-                    console.log('error while running getNotifications')
-                }
-            )
-        }, 1000);
-    }, [sessionStorage.getItem('@portalmec/uid')])
     function handleClick(event) {
         console.log('event.currentTarget: ', event.currentTarget)
         setAnchorEl(event.currentTarget);
diff --git a/src/Components/NotificationsInner.js b/src/Components/NotificationsInner.js
index 5b80924a112447925393c4d6a3117aa9826d7e58..4630287968d81ff709a2fb3d4dd46e88ab70d38e 100644
--- a/src/Components/NotificationsInner.js
+++ b/src/Components/NotificationsInner.js
@@ -1,30 +1,21 @@
 import React, {useState, useContext, useEffect} from 'react'
 import styled from 'styled-components'
-import {apiDomain, apiUrl} from '../env.js'
-import axios from 'axios'
+import {apiDomain} from '../env.js'
 import ActivityListItem from './ActivityListItem.js'
-import {getAxiosConfig} from './HelperFunctions/getAxiosConfig.js'
+import {getRequest} from './HelperFunctions/getAxiosConfig'
 
 export default function NotificationInner (props) {
     const [notifications, setNotifications] = useState([]);
     const [notificatonsLength, setLength] = useState(0);
-    useEffect(() => {
-        let config = getAxiosConfig()
-        axios.get(`${apiUrl}/feed?offset=0&limit=30`, config)
-        .then( (response) => {
-                if ( response.headers['access-token'] ) {
-                    sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-                }
 
-                console.log('atividades response: ', response)
-                setNotifications(response.data)
-                setLength(response.data.length)
+    function handleSuccess (data) {
+        setNotifications(data)
+        setLength(data.length)
+    }
+    useEffect(() => {
+        const url = `/feed?offset=0&limit=30`
 
-            },
-            (error) => {
-                console.log('error while running getNotifications')
-            }
-        )
+        getRequest(url, handleSuccess, (error) => {console.log('error while running getNotifications')})
     }, [])
 
     return (
diff --git a/src/Components/PageProfessorComponents/PartOne.js b/src/Components/PageProfessorComponents/PartOne.js
index 6fe3e70cb933c64da77e923804f69fe375fbc580..ad8fcf9a72464421bb2a467cd1c4b32aa9244db0 100644
--- a/src/Components/PageProfessorComponents/PartOne.js
+++ b/src/Components/PageProfessorComponents/PartOne.js
@@ -88,7 +88,6 @@ export default function PartOne (props) {
     }
 
     const handleSubmit = () => {
-        console.log('handle submit : ', uf.abbreviation, uf.name, municipio.name, codigoINEP.value)
         props.handleBuscar(uf.abbreviation, uf.name, municipio.name, codigoINEP.value)
     }
 
diff --git a/src/Components/PublicationPermissionsContent.js b/src/Components/PublicationPermissionsContent.js
index 533993c1c89990ec78de3a59cd34a93db0119132..ddccba30f8c1ec5f98349ae1e9589c2a90554dca 100644
--- a/src/Components/PublicationPermissionsContent.js
+++ b/src/Components/PublicationPermissionsContent.js
@@ -8,8 +8,7 @@ import Radio from '@material-ui/core/Radio';
 import FormControl from '@material-ui/core/FormControl';
 import Grid from '@material-ui/core/Grid';
 import { withStyles } from '@material-ui/core/styles';
-import axios from 'axios'
-import {apiUrl} from '../env';
+import {getRequest} from './HelperFunctions/getAxiosConfig'
 
 const StyledFormControl = styled(FormControl)`
     display: "block ruby";
@@ -31,16 +30,14 @@ export default function PublicationPermissionsContent (props) {
     const [questionsArr, setQuestionsArr] = useState([])
     const handleSetQuestionsArr = (newArr) => {setQuestionsArr(newArr)}
 
+    function handleSuccess (data) {
+        handleSetQuestionsArr(data)
+    }
+
     useEffect(() => {
-        axios.get(`${apiUrl}/questions/`).then(
-            (response) => {
-                console.log(response)
-                handleSetQuestionsArr(response.data)
-            },
-            (error) => {
-                console.log('falhou em get questions')
-            }
-        )
+        const url = `/questions/`
+
+        getRequest(url, handleSuccess, (error) => {console.log(error)})
 
     }, [])
 
diff --git a/src/Components/ReportModal.js b/src/Components/ReportModal.js
index be2248dfa1b53d92cea76d45c82c246934ed66bf..079ca75fd3dd6454d6e26263767ac33d3ad3b556 100644
--- a/src/Components/ReportModal.js
+++ b/src/Components/ReportModal.js
@@ -16,19 +16,19 @@ GNU Affero General Public License for more details.
 You should have received a copy of the GNU Affero General Public License
 along with Plataforma Integrada MEC.  If not, see <http://www.gnu.org/licenses/>.*/
 
-import React, {useContext} from 'react';
+import React, {useContext, useState} from 'react';
 import { Button } from '@material-ui/core';
 import Modal from '@material-ui/core/Modal';
 import Backdrop from '@material-ui/core/Backdrop';
 import Fade from '@material-ui/core/Fade';
 import styled from 'styled-components'
 import {Store} from '../Store.js'
-import axios from 'axios'
-import {apiUrl} from '../env';
 import CloseIcon from '@material-ui/icons/Close';
 import ReportUserForm from './ReportUserForm.js'
 import ReportRecursoForm from './ReportRecursoForm.js'
 import ReportColecaoForm from './ReportColecaoForm.js'
+import {postRequest} from './HelperFunctions/getAxiosConfig'
+import SnackbarComponent from './SnackbarComponent.js'
 
 function CloseModalButton (props) {
     return (
@@ -40,11 +40,10 @@ function CloseModalButton (props) {
 
 export default function ReportModal (props) {
     const {state} = useContext(Store)
+    const [snackbarOpen, handleSnackbar] = useState(false)
 
     const handleSubmit  = (complaint_reason_id, description) => {
-        console.log('complaint_reason_id: ', complaint_reason_id)
-        console.log('description: ', description)
-
+        const url = `/complaints/`
         const payload = {
             "complaint" : {
                 "user_id" : state.currentUser.id,
@@ -54,18 +53,13 @@ export default function ReportModal (props) {
                 "complaint_reason_id" : complaint_reason_id
             }
         }
-        console.log(payload)
 
-        axios.post(`${apiUrl}/complaints`,
-        {
-            "complaint" : {
-                "user_id" : state.currentUser.id,
-                "description" : description,
-                "complainable_id" : props.complainableId,
-                "complainable_type" : props.complainableType,
-                "complaint_reason_id" : complaint_reason_id
-            }
-        }).then( (response) => {console.log(response)}, (error) => {console.log(error)})
+        postRequest(url, payload, (data) => {
+            console.log(data)
+            props.handleClose();
+            handleSnackbar(true);
+        }, (error) => {console.log(error)})
+
     }
 
     const renderForm = (formType) => {
@@ -85,49 +79,40 @@ export default function ReportModal (props) {
             }
     }
 
-    /* const renderForm = (formType) => {
-        switch (formType) {
-						case 'colecao':
-							return (
-								<ReportCollectionForm
-									handleClose={props.handleClose}
-									handleSubmit={handleSubmit}
-								/>
-							);
-							break;
-            }
-    } */
-
     return (
-        <StyledModal
-            aria-labelledby="transition-modal-title"
-            aria-describedby="transition-modal-description"
-            open={props.open}
-
-            centered="true"
-            onClose={props.handleClose}
-            closeAfterTransition
-            BackdropComponent={Backdrop}
-            BackdropProps={{
-                timeout: 500,
-            }}
-        >
-            <Fade in={props.open}>
-                <ReportContainer>
-                    <Header>
-                        <span style={{width:"32px"}}/>
-                        <h2>O que está acontecendo?</h2>
-                        <CloseModalButton handleClose={props.handleClose}/>
-                    </Header>
-
-                    <Content>
-                        {
-                            renderForm(props.form)
-                        }
-                    </Content>
-                </ReportContainer>
-            </Fade>
-        </StyledModal>
+        <React.Fragment>
+            <SnackbarComponent snackbarOpen={snackbarOpen} severity={"success"} handleClose={() => {handleSnackbar(false)}} text={"Sua reclamação foi recebida."}
+                />
+            <StyledModal
+                aria-labelledby="transition-modal-title"
+                aria-describedby="transition-modal-description"
+                open={props.open}
+
+                centered="true"
+                onClose={props.handleClose}
+                closeAfterTransition
+                BackdropComponent={Backdrop}
+                BackdropProps={{
+                    timeout: 500,
+                }}
+            >
+                <Fade in={props.open}>
+                    <ReportContainer>
+                        <Header>
+                            <span style={{width:"32px"}}/>
+                            <h2>O que está acontecendo?</h2>
+                            <CloseModalButton handleClose={props.handleClose}/>
+                        </Header>
+
+                        <Content>
+                            {
+                                renderForm(props.form)
+                            }
+                        </Content>
+                    </ReportContainer>
+                </Fade>
+            </StyledModal>
+        </React.Fragment>
     )
 }
 
diff --git a/src/Components/ResourceCardFunction.js b/src/Components/ResourceCardFunction.js
index 6fbee114729d61f7cd480b4736cbcf6ea101c988..08d07b6190f283703263cbbabf3e676737425bc3 100644
--- a/src/Components/ResourceCardFunction.js
+++ b/src/Components/ResourceCardFunction.js
@@ -18,8 +18,7 @@ along with Plataforma Integrada MEC.  If not, see <http://www.gnu.org/licenses/>
 
 import React, { useState, useEffect } from 'react';
 import Card from '@material-ui/core/Card';
-import axios from 'axios'
-import { apiDomain, apiUrl } from '../env';
+import {apiDomain} from '../env';
 import ResourceCardOptions from './ResourceCardOptions'
 import noAvatar from "../img/default_profile.png";
 // import { makeStyles } from '@material-ui/core/styles';
@@ -51,12 +50,8 @@ import Grid from '@material-ui/core/Grid';
 import { Link } from 'react-router-dom';
 import { getDefaultThumbnail } from './HelperFunctions/getDefaultThumbnail'
 import GetIconByName from './UploadPageComponents/GetIconByName'
-import { getAxiosConfig } from './HelperFunctions/getAxiosConfig'
-// import DefaultAvatar from '../../public/img/logo_parceiros/ic_default.png'
 import "./ResourceCard.css";
-
-// const types = [{label: "Animação", thumb: animacao}, {label: "Apresentação", thumb: apresentacao},
-// {label: "Aplicativo" , thumb: aplicativo}, {label: "Áudio", thumb: audio}, {label: "Vazio", thumb: vazio}, {label: "Imagem", thumb: imagem}, {label: "Gráfico", thumb: grafico}, {label: "Jogo", thumb: jogo}, {label: "Livro", thumb: livro}, {label:"Livro digital", thumb: livro}, {label: "Mapa", thumb: mapa}, {label: "Outros", thumb: outros}, {label: "Software Educacional", thumb:software}, {label: "Software", thumb:software}, {label: "Texto", thumb:texto}, {label: "Vídeo", thumb:video}]
+import {putRequest} from './HelperFunctions/getAxiosConfig'
 
 export default function ResourceCardFunction(props) {
     const [thumbnail, setThumbnail] = useState(null)
@@ -86,23 +81,15 @@ export default function ResourceCardFunction(props) {
 
     }, [])
 
+    function handleSuccessLike (data) {
+        toggleLiked(!liked)
+        setLikesCount(data.count)
+    }
+
     const handleLike = () => {
-        let payload = {}
-        let config = getAxiosConfig()
-
-        axios.put((`${apiUrl}/learning_objects/` + props.id + '/like'), payload, config
-        ).then(
-            (response) => {
-                console.log(response.data)
-                if (response.headers['access-token']) {
-                    sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-                }
-                toggleLiked(!liked)
-                setLikesCount(response.data.count)
+        const url = `/learning_objects/${props.id}/like/`
 
-            },
-            (error) => { console.log(error) }
-        )
+        putRequest(url, {}, handleSuccessLike, (error) => {console.log(error)})
     }
 
     const SlideAnimationContent = () => {
diff --git a/src/Components/ResourcePageComponents/CommentForm.js b/src/Components/ResourcePageComponents/CommentForm.js
index 0c1b3a852166d1474cfcc5192f1abffa204523e8..0b1c38ba693b98b03c689f18035a6f81478d9cd9 100644
--- a/src/Components/ResourcePageComponents/CommentForm.js
+++ b/src/Components/ResourcePageComponents/CommentForm.js
@@ -4,10 +4,9 @@ import Rating from '@material-ui/lab/Rating';
 import StarIcon from '@material-ui/icons/Star';
 import TextField from "@material-ui/core/TextField";
 import { Button } from '@material-ui/core';
-import axios from 'axios'
-import {apiUrl} from '../../env';
 import EditIcon from '@material-ui/icons/Edit';
 import Grid from '@material-ui/core/Grid';
+import {postRequest} from '../HelperFunctions/getAxiosConfig'
 
 export default function CommentForm (props) {
     const [rating, setRating] = useState({
@@ -27,22 +26,19 @@ export default function CommentForm (props) {
 
     const [attemptedSubmit, setAttempt] = useState(false)
 
+    function handleSuccess (data) {
+        props.handleSnackbar(1)
+        props.rerenderCallback()
+    }
     const handleSubmit = (e) => {
         e.preventDefault()
         const finalRating = rating
         const finalComment = comment
 
-
         if (!(finalRating.error || finalComment.error)) {
-            let config = {
-                headers : {
-                    'Accept': 'application/json',
-                    'Content-Type': 'application/json',
-                    'Access-Token': sessionStorage.getItem('@portalmec/accessToken'),
-                    'Client': sessionStorage.getItem('@portalmec/clientToken'),
-                    'Uid': sessionStorage.getItem('@portalmec/uid'),
-                }
-            }
+            let type = props.recurso ? 'learning_objects' : 'collections'
+            const url = `/${type}/${props.recursoId}/reviews`
+
             let payload = {
                 "review" : {
                     "description" : finalComment.value,
@@ -54,17 +50,8 @@ export default function CommentForm (props) {
                     ]
                 }
             }
-            let type = props.recurso ? 'learning_objects/' : 'collections/'
-            console.log(payload)
-            axios.post( (`${apiUrl}/` + type + props.recursoId + '/reviews'), payload, config
-        ).then((response) => {
-            if ( response.headers['access-token'] ) {
-                sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-            }
-            console.log(response.data);
-             props.handleSnackbar(1);
-              props.rerenderCallback()},
-        (error) => {console.log(error)})
+
+            postRequest(url, payload, handleSuccess, (error) => {console.log(error)})
         }
         else {
             setAttempt(true)
diff --git a/src/Components/ResourcePageComponents/CommentsArea.js b/src/Components/ResourcePageComponents/CommentsArea.js
index fdabf83639c62c34221ad6d5d3d093c5c1a7dba1..10a9482f73b5e49ac3e7089453cee29378fca290 100644
--- a/src/Components/ResourcePageComponents/CommentsArea.js
+++ b/src/Components/ResourcePageComponents/CommentsArea.js
@@ -23,10 +23,10 @@ import Grid from '@material-ui/core/Grid';
 import { Button } from '@material-ui/core';
 import ExitToAppIcon from '@material-ui/icons/ExitToApp';
 import Comentarios from '../../img/comentarios.png'
-import {apiUrl, apiDomain} from '../../env';
+import {apiDomain} from '../../env';
 import CommentForm from './CommentForm.js'
-import axios from 'axios'
 import Comment from '../Comment.js'
+import {getRequest} from '../HelperFunctions/getAxiosConfig'
 
 export default function CommentsArea (props) {
     const {state} = useContext(Store)
@@ -34,15 +34,14 @@ export default function CommentsArea (props) {
     const [gambiarra, setState] = useState(0)
     const forceUpdate = () => {setState(gambiarra + 1)}
 
+    function handleSuccess (data) {
+        setComentarios(data.sort((a, b) => a.updated_at > b.updated_at ? -1 : 1))
+    }
+
     useEffect( () => {
-        axios.get( (`${apiUrl}/learning_objects/` + props.recursoId + '/reviews')
-    ).then( (response) => {
-        if ( response.headers['access-token'] ) {
-            sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-        }
-        console.log(response)
-        setComentarios(response.data.sort((a, b) => a.updated_at > b.updated_at ? -1 : 1))
-    }, (error) => {console.log(error)})
+        const url = `/learning_objects/${props.recursoId}/reviews`
+
+        getRequest(url, handleSuccess, (error) => {console.log(error)})
     }, [gambiarra])
 
     return (
@@ -55,7 +54,7 @@ export default function CommentsArea (props) {
                                 <h3>Conte sua experiência com o Recurso</h3>
                                 <Grid container style={{paddingTop : "20px"}}>
                                     <Grid item xs={2} style={{paddingLeft : "15px", paddingRight : "15px"}}>
-                                        <img src={apiDomain + state.currentUser.avatar_file_name} className="minha-imagem" alt="user avatar"/>
+                                        <img src={apiDomain + state.currentUser.avatar} className="minha-imagem" alt="user avatar"/>
                                     </Grid>
                                     <Grid item xs={10}>
                                         <CommentForm
diff --git a/src/Components/ResourcePageComponents/TextoObjeto.js b/src/Components/ResourcePageComponents/TextoObjeto.js
index 5b5bc3cdefe384f9a579681ba24fc6f5d637018d..1554cc9ebd70387fd72cb155f749232133f1b5c0 100644
--- a/src/Components/ResourcePageComponents/TextoObjeto.js
+++ b/src/Components/ResourcePageComponents/TextoObjeto.js
@@ -29,9 +29,7 @@ import Button from '@material-ui/core/Button';
 import {Link, Redirect} from 'react-router-dom'
 import Alert from '../Alert.js';
 import Snackbar from '@material-ui/core/Snackbar';
-import {getAxiosConfig} from '../HelperFunctions/getAxiosConfig'
-import axios from 'axios'
-import {apiUrl} from '../../env';
+import {deleteRequest} from '../HelperFunctions/getAxiosConfig'
 
 export default function TextoObjeto (props) {
     const {state} = useContext(Store)
@@ -81,21 +79,13 @@ export default function TextoObjeto (props) {
 
     const [snackbarOpen, toggleSnackbar] = useState(false)
     const [publisherDeletedObject, toggleDeleted] = useState(false)
+    function handleSuccess (data) {
+        toggleSnackbar(true)
+        toggleDeleted(true)
+    }
     const handleDelete = () => {
-        let config = getAxiosConfig()
-        axios.delete((`${apiUrl}/learning_objects/` + props.recursoId), config).then(
-            (response) => {
-                toggleSnackbar(true)
-                console.log(response.data)
-                if ( response.headers['access-token'] ) {
-                    sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-                }
-                toggleDeleted(true)
-            },
-            (error) => {
-                console.log(error)
-            }
-        )
+        const url = `/learning_objects/${props.recursoId}`
+        deleteRequest(url, handleSuccess, (error) => {console.log(error)})
     }
 
     const checkAccessLevel = (levelToCheck) => {
diff --git a/src/Components/SignUpContainerFunction.js b/src/Components/SignUpContainerFunction.js
index 19ec20363c139c803bfd66c9f5807f83ce52a35e..d336d3417c5075122c4090f03be9695458746620 100644
--- a/src/Components/SignUpContainerFunction.js
+++ b/src/Components/SignUpContainerFunction.js
@@ -26,7 +26,7 @@ import FormInput from "./FormInput.js"
 import {StyledCloseModalButton, DialogContentDiv, DialogHeaderStyled, SocialConnectDiv, H3Div} from './LoginContainerFunction.js'
 import {apiUrl} from '../env.js'
 import {GoogleLoginButton} from './LoginContainerFunction'
-import ValidateUserInput from '../Components/FormValidationFunction.js'
+import ValidateUserInput from './HelperFunctions/FormValidationFunction.js'
 import GoogleLogo from "../img/logo_google.svg"
 
 async function handleGoogleAttempt () {
diff --git a/src/Components/SignUpModal.js b/src/Components/SignUpModal.js
index d5d26a54fbe21f8e5d33be7c9514376a81f2bcc3..d3ed47c79a2b85273ff94601d99092d6e52bbacc 100644
--- a/src/Components/SignUpModal.js
+++ b/src/Components/SignUpModal.js
@@ -22,32 +22,22 @@ import Fade from '@material-ui/core/Fade';
 import styled from 'styled-components'
 import SignUpContainer from './SignUpContainerFunction.js'
 import {Store} from '../Store.js'
-import axios from 'axios'
-import {apiUrl} from '../env';
-
-const StyledModalSignUp = styled(Modal)`
-    .djXaxP{
-        margin : 0 !important;
-    }
-
-    display : flex;
-    align-items: center;
-    justify-content : center;
-    text-align : center;
-    padding : 10px !important;
-    border-radius : 4px;
-
-`
-
-
+import {authentication} from './HelperFunctions/getAxiosConfig'
 
 export default function SignUpModal (props) {
     const { state, dispatch } = useContext(Store)
 
+    function handleSuccess (data) {
+        dispatch ({
+            type: 'USER_SIGNED_UP',
+            userLoggedIn: !state.userIsLoggedIn,
+            user: data.data
+        })
+        props.handleClose()
+    }
     const handleLoginInfo = (newLogin) => {
-        // {/*console.log(state.currentUser)*/}
-        axios.post(`${apiUrl}/auth`,
-            {
+        const url = `/auth`
+        const payload = {
             name : newLogin.name,
             email: newLogin.email,
             password : newLogin.password,
@@ -55,37 +45,9 @@ export default function SignUpModal (props) {
             terms_of_service:true,
             avatar: ""
         }
-        ).then( (response) => {
-            dispatch ( {
-                type: 'USER_SIGNED_UP',
-                userLoggedIn: !state.userIsLoggedIn,
-                user: response.data.data
-                }
-            )
-            localStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-            localStorage.setItem('@portalmec/clientToken', response.headers.client,)
-            localStorage.setItem('@portalmec/id', response.data.data.id)
-            localStorage.setItem('@portalmec/username', response.data.data.name)
-            localStorage.setItem('@portalmec/uid', response.data.data.uid)
-
-            let headers = {
-                client:response.headers.client,
-                "access-token":response.headers['access-token'],
-                "token-type": "Bearer",
-                expiry:response.headers.expiry,
-                uid:response.data.data.uid
-            }
-            sessionStorage.setItem('@portalmec/auth_headers', JSON.stringify(headers))
-
-            props.handleClose()
-            }, (error) => {
-                console.log(':(')
-            }
-        )
+        authentication(url, payload, handleSuccess, (error) => {console.log(error)})
     }
 
-    //useEffect(()=>{console.log(state.currentUser)},[state.currentUser])
-
     return (
         <StyledModalSignUp
             aria-labelledby="transition-modal-title"
@@ -110,3 +72,17 @@ export default function SignUpModal (props) {
         </StyledModalSignUp>
     )
 }
+
+const StyledModalSignUp = styled(Modal)`
+    .djXaxP{
+        margin : 0 !important;
+    }
+
+    display : flex;
+    align-items: center;
+    justify-content : center;
+    text-align : center;
+    padding : 10px !important;
+    border-radius : 4px;
+
+`
diff --git a/src/Components/TabPanels/Breadcrumbs.js b/src/Components/TabPanels/Breadcrumbs.js
index 00d547825993a8dd803b6d3a7f89617e71fd2714..1d208986d7bd89b210da95806d101796301a36d9 100644
--- a/src/Components/TabPanels/Breadcrumbs.js
+++ b/src/Components/TabPanels/Breadcrumbs.js
@@ -1,3 +1,22 @@
+/*Copyright (C) 2019 Centro de Computacao Cientifica e Software Livre
+Departamento de Informatica - Universidade Federal do Parana
+
+This file is part of Plataforma Integrada MEC.
+
+Plataforma Integrada MEC is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Plataforma Integrada MEC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with Plataforma Integrada MEC.  If not, see <http://www.gnu.org/licenses/>.*/
+
+
 import React from 'react'
 import styled from 'styled-components'
 import Breadcrumbs from '@material-ui/core/Breadcrumbs';
@@ -12,8 +31,8 @@ export default function CustomizedBreadcrumbs (props) {
                     Página Inicial
                 </Link>
                 {
-                    props.values.map( (value) =>
-                        <span>
+                    props.values.map( (value, i) =>
+                        <span key={i}>
                             {value}
                         </span>
                     )
diff --git a/src/Components/TabPanels/PanelComponents/TemplateColecao.js b/src/Components/TabPanels/PanelComponents/TemplateColecao.js
index 24c98c021cd500d8a4ada31e310f1ba5ca00aacb..3b1e029ae45caa45f28068cd95693796a6331a86 100644
--- a/src/Components/TabPanels/PanelComponents/TemplateColecao.js
+++ b/src/Components/TabPanels/PanelComponents/TemplateColecao.js
@@ -78,15 +78,12 @@ export default function PanelTemplateColecao(props) {
 
             {
                 props.length === 0 ?
-                    (
-                        [
-                            <NoContent text={props.noContentText} />
-                        ]
-                    )
-                    :
-                    (
-                        [
-                            <React.Fragment>
+                (
+                    <NoContent text={props.noContentText}/>
+                )
+                :
+                (
+                        <React.Fragment>
 
                                 <StyledGrid container spacing={1} style={{ paddingLeft: "30px", paddingRight: "15px" }}>
                                     {
@@ -98,15 +95,14 @@ export default function PanelTemplateColecao(props) {
                                     }
                                 </StyledGrid>
 
-                                <ButtonsAreaColecao
-                                    sliceLength={props.sliceArr.length}
-                                    length={props.length}
-                                    showMore={() => props.showMore()}
-                                    showAll={() => props.showAll()}
-                                />
-                            </React.Fragment>
-                        ]
-                    )
+                            <ButtonsAreaColecao
+                                sliceLength={props.sliceArr.length}
+                                length={props.length}
+                                showMore={() => props.showMore()}
+                                showAll={() => props.showAll()}
+                            />
+                        </React.Fragment>
+                )
             }
 
         </WhiteContainer>
diff --git a/src/Components/TabPanels/PanelComponents/TemplateRede.js b/src/Components/TabPanels/PanelComponents/TemplateRede.js
index b4ded29ef208c343697b8828481bf517abacd27c..e92a49db31b72e4b5d89a91f4e26658c520ba66a 100644
--- a/src/Components/TabPanels/PanelComponents/TemplateRede.js
+++ b/src/Components/TabPanels/PanelComponents/TemplateRede.js
@@ -13,8 +13,8 @@ export default function PanelTemplateRede (props) {
             return (
                 <ContactCard
                     name = {card.follower.name}
-                    avatar = {card.follower.avatar ? apiDomain + card.follower.avatar : null}
-                    cover={card.follower.cover ? apiDomain + card.follower.cover : null}
+                    avatar = {card.follower.avatar !== undefined && card.follower.avatar  !== ""? apiDomain + card.follower.avatar : null}
+                    cover={card.follower.cover !== undefined && card.follower.cover !== "" ? apiDomain + card.follower.cover : null}
                     numCollections = {card.follower.collections_count}
                     numLearningObjects = {card.follower.learning_objects_count}
                     follow_count={card.follower.follows_count}
@@ -28,8 +28,8 @@ export default function PanelTemplateRede (props) {
             return (
                 <ContactCard
                          name = {card.followable.name}
-                         avatar = {card.followable.avatar ? apiDomain + '/' + card.followable.avatar : null}
-                         cover={apiDomain + card.followable.cover}
+                         avatar = {card.followable.avatar !== undefined && card.followable.avatar !== "" ? apiDomain + '/' + card.followable.avatar : null}
+                         cover={card.followable.cover !== undefined && card.followable.cover !== "" ? apiDomain + card.followable.cover : null}
                          numCollections = {card.followable.collections_count}
                          numLearningObjects = {card.followable.learning_objects_count}
                          follow_count={card.followable.follows_count}
diff --git a/src/Components/TabPanels/PublicUserPageTabs/LastCollections.js b/src/Components/TabPanels/PublicUserPageTabs/LastCollections.js
index a7c78a9a5244154f839368883ed7190e25cce210..553b9788dc860e290de3b72bf1acdfd7e06b1730 100644
--- a/src/Components/TabPanels/PublicUserPageTabs/LastCollections.js
+++ b/src/Components/TabPanels/PublicUserPageTabs/LastCollections.js
@@ -1,3 +1,21 @@
+/*Copyright (C) 2019 Centro de Computacao Cientifica e Software Livre
+Departamento de Informatica - Universidade Federal do Parana
+
+This file is part of Plataforma Integrada MEC.
+
+Plataforma Integrada MEC is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Plataforma Integrada MEC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with Plataforma Integrada MEC.  If not, see <http://www.gnu.org/licenses/>.*/
+
 import React from 'react'
 import Grid from '@material-ui/core/Grid';
 import { HeaderGrid, StyledGrid } from '../StyledComponents.js'
diff --git a/src/Components/TabPanels/PublicUserPageTabs/LastLearnObj.js b/src/Components/TabPanels/PublicUserPageTabs/LastLearnObj.js
index ff42a36aad88e690f0d33c1f104cd9d31beecf77..705faa8d77e70cdeee8b6bbf4ea9e65ead1313fc 100644
--- a/src/Components/TabPanels/PublicUserPageTabs/LastLearnObj.js
+++ b/src/Components/TabPanels/PublicUserPageTabs/LastLearnObj.js
@@ -1,3 +1,21 @@
+/*Copyright (C) 2019 Centro de Computacao Cientifica e Software Livre
+Departamento de Informatica - Universidade Federal do Parana
+
+This file is part of Plataforma Integrada MEC.
+
+Plataforma Integrada MEC is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Plataforma Integrada MEC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with Plataforma Integrada MEC.  If not, see <http://www.gnu.org/licenses/>.*/
+
 import React from 'react'
 import Grid from '@material-ui/core/Grid';
 import ResourceCardFunction from '../../ResourceCardFunction.js'
diff --git a/src/Components/TabPanels/PublicUserPageTabs/TabColecoes.js b/src/Components/TabPanels/PublicUserPageTabs/TabColecoes.js
index 79a3b3cad97c821a72a8fe55a5baed9ba7b24c55..2b81757d34ee93379d60a8165bac6f6f31216f2e 100644
--- a/src/Components/TabPanels/PublicUserPageTabs/TabColecoes.js
+++ b/src/Components/TabPanels/PublicUserPageTabs/TabColecoes.js
@@ -1,5 +1,23 @@
-import React, { useState, useEffect } from 'react'
-import { HeaderGrid, ContainerStyled, Carregados } from '../StyledComponents.js'
+/*Copyright (C) 2019 Centro de Computacao Cientifica e Software Livre
+Departamento de Informatica - Universidade Federal do Parana
+
+This file is part of Plataforma Integrada MEC.
+
+Plataforma Integrada MEC is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Plataforma Integrada MEC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with Plataforma Integrada MEC.  If not, see <http://www.gnu.org/licenses/>.*/
+
+import React, {useState, useEffect} from 'react'
+import {HeaderGrid, ContainerStyled, Carregados} from '../StyledComponents.js'
 import Grid from '@material-ui/core/Grid';
 import CollectionCardFunction from '../../CollectionCardFunction.js'
 import { ButtonMostrarMaisColecao } from '../PanelComponents/ButtonsArea.js'
diff --git a/src/Components/TabPanels/PublicUserPageTabs/TabInicio.js b/src/Components/TabPanels/PublicUserPageTabs/TabInicio.js
index 9e3cd80b7343218d3110cf687e0b96bce7ee55bd..0663a44c4412e545429c7b560bf9eb2ca9e88126 100644
--- a/src/Components/TabPanels/PublicUserPageTabs/TabInicio.js
+++ b/src/Components/TabPanels/PublicUserPageTabs/TabInicio.js
@@ -1,3 +1,21 @@
+/*Copyright (C) 2019 Centro de Computacao Cientifica e Software Livre
+Departamento de Informatica - Universidade Federal do Parana
+
+This file is part of Plataforma Integrada MEC.
+
+Plataforma Integrada MEC is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Plataforma Integrada MEC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with Plataforma Integrada MEC.  If not, see <http://www.gnu.org/licenses/>.*/
+
 import React from 'react'
 import styled from 'styled-components'
 import UserDescription from './UserDescription.js'
diff --git a/src/Components/TabPanels/PublicUserPageTabs/TabRecursos.js b/src/Components/TabPanels/PublicUserPageTabs/TabRecursos.js
index b7431b12b2ff3e321f01b19f8c2eae79707fc2df..bf677ebd921dd7f91ffe469a49c4800686843191 100644
--- a/src/Components/TabPanels/PublicUserPageTabs/TabRecursos.js
+++ b/src/Components/TabPanels/PublicUserPageTabs/TabRecursos.js
@@ -1,8 +1,27 @@
-import React, { useState, useEffect } from 'react'
-import { HeaderGrid, ContainerStyled, Carregados } from '../StyledComponents.js'
+/*Copyright (C) 2019 Centro de Computacao Cientifica e Software Livre
+Departamento de Informatica - Universidade Federal do Parana
+
+This file is part of Plataforma Integrada MEC.
+
+Plataforma Integrada MEC is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Plataforma Integrada MEC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with Plataforma Integrada MEC.  If not, see <http://www.gnu.org/licenses/>.*/
+
+import React, {useState, useEffect} from 'react'
+import {HeaderGrid, ContainerStyled, Carregados} from '../StyledComponents.js'
 import Grid from '@material-ui/core/Grid';
 import ResourceCardFunction from '../../ResourceCardFunction.js'
-import { ButtonMostrarMaisRecurso } from '../PanelComponents/ButtonsArea'
+import {ButtonMostrarMaisRecurso} from '../PanelComponents/ButtonsArea'
+import {getRequest} from '../../HelperFunctions/getAxiosConfig'
 
 export default function TabRecursos(props) {
     const [arr, setArr] = useState([])
@@ -14,9 +33,22 @@ export default function TabRecursos(props) {
         setSlice(props.learningObjs.slice(0, 4))
     }, [])
 
+    function handleSuccess (data) {
+        setArr(data)
+        setSlice(data)
+    }
     const showMore = (quantity) => {
         var sliceLength = objsSlice.length
-        handleSlice(arr.slice(0, sliceLength + quantity))
+        var newLength = sliceLength + quantity
+
+        if (newLength > 12) {
+            const url = `/users/${props.id}/learning_objects?limit=${newLength}$offset=4`
+            getRequest(url,handleSuccess,(error) => {console.log(error)})
+        }
+        else {
+            handleSlice(arr.slice(0, sliceLength + quantity))
+        }
+
     }
 
     return (
diff --git a/src/Components/TabPanels/PublicUserPageTabs/TabRede.js b/src/Components/TabPanels/PublicUserPageTabs/TabRede.js
index b3dea17eb8b0c7943b3be4e8c7506c7f162c6004..c173dc195d4000acbeda628ffbbef127d1934339 100644
--- a/src/Components/TabPanels/PublicUserPageTabs/TabRede.js
+++ b/src/Components/TabPanels/PublicUserPageTabs/TabRede.js
@@ -1,20 +1,24 @@
+/*Copyright (C) 2019 Centro de Computacao Cientifica e Software Livre
+Departamento de Informatica - Universidade Federal do Parana
+
+This file is part of Plataforma Integrada MEC.
+
+Plataforma Integrada MEC is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Plataforma Integrada MEC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with Plataforma Integrada MEC.  If not, see <http://www.gnu.org/licenses/>.*/
+
 import React, {useState, useEffect} from 'react'
-import axios from 'axios'
-import {apiUrl} from '../../../env';
 import PanelTemplateRede from '../PanelComponents/TemplateRede.js'
-
-const getConfig = () => {
-    let config = {
-        headers : {
-            'Accept': 'application/json',
-            'Content-Type':'application/json',
-            'Access-Token': sessionStorage.getItem('@portalmec/accessToken'),
-            'Client': sessionStorage.getItem('@portalmec/clientToken'),
-            'Uid': sessionStorage.getItem('@portalmec/uid')
-        }
-    }
-    return config
-}
+import {fetchAllRequest} from '../../HelperFunctions/getAxiosConfig'
 
 export default function TabRede (props) {
     const [followers, setFollowers] = useState([])
@@ -34,26 +38,19 @@ export default function TabRede (props) {
     }
     const showAllFollowing = () => {setFollowingSlice(following)}
 
+    function handleSuccess (responseArr) {
+        setFollowers(responseArr[0])
+        setFollowersSlice(responseArr[0].slice(0,4))
+
+        setFollowing(responseArr[1])
+        setFollowingSlice(responseArr[1].slice(0,4))
+    }
+
     useEffect( () => {
-        axios.all([
-            axios.get((`${apiUrl}/users/` + props.id + '/followers'), getConfig()),
-            axios.get((`${apiUrl}/users/` + props.id + '/following/User'), getConfig())
-        ])
-        .then( (responseArr) => {
-                console.log('responseArr Rede: ', responseArr)
-                if (responseArr[0].headers['access-token']) {
-                    sessionStorage.setItem('@portalmec/accessToken', responseArr[0].headers['access-token'])
-                }
-                setFollowers(responseArr[0].data)
-                setFollowersSlice(responseArr[0].data.slice(0,4))
 
-                setFollowing(responseArr[1].data)
-                setFollowingSlice(responseArr[1].data.slice(0,4))
-            },
-            (error) => {
-                console.log('error while running axios all')
-            }
-        )
+        const urls = [`/users/${props.id}/followers`, `/users/${props.id}/following/User`]
+
+        fetchAllRequest(urls, handleSuccess, (error) => {console.log(error)})
     }, [])
 
     return (
diff --git a/src/Components/TabPanels/PublicUserPageTabs/UserDescription.js b/src/Components/TabPanels/PublicUserPageTabs/UserDescription.js
index 495e60e37f549d330c9281f2f86c71d73590367f..4fcc273f0a0b3e8ed984f1d831488d8002a978dd 100644
--- a/src/Components/TabPanels/PublicUserPageTabs/UserDescription.js
+++ b/src/Components/TabPanels/PublicUserPageTabs/UserDescription.js
@@ -1,3 +1,21 @@
+/*Copyright (C) 2019 Centro de Computacao Cientifica e Software Livre
+Departamento de Informatica - Universidade Federal do Parana
+
+This file is part of Plataforma Integrada MEC.
+
+Plataforma Integrada MEC is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Plataforma Integrada MEC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with Plataforma Integrada MEC.  If not, see <http://www.gnu.org/licenses/>.*/
+
 import React from 'react'
 import styled from 'styled-components'
 
diff --git a/src/Components/TabPanels/TabPanelStatusEConquistas.js b/src/Components/TabPanels/TabPanelStatusEConquistas.js
index 2617f8a7884e503a540010e73c0a41101a373b39..d9e0c20762cb1387ee0ab460f27fe5aeffd2dc07 100644
--- a/src/Components/TabPanels/TabPanelStatusEConquistas.js
+++ b/src/Components/TabPanels/TabPanelStatusEConquistas.js
@@ -1,3 +1,22 @@
+/*Copyright (C) 2019 Centro de Computacao Cientifica e Software Livre
+Departamento de Informatica - Universidade Federal do Parana
+
+This file is part of Plataforma Integrada MEC.
+
+Plataforma Integrada MEC is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Plataforma Integrada MEC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with Plataforma Integrada MEC.  If not, see <http://www.gnu.org/licenses/>.*/
+
+
 import React, {useContext, useState, useEffect} from 'react'
 import { Store } from '../../Store.js'
 import styled from 'styled-components'
@@ -68,7 +87,7 @@ export default function TabPanelStatusEConquistas (props) {
 									src={a.imgsrc}
 									requirements={a.requirements}
                                     />
-									
+
 							</Grid>
 						)}
 				)}
diff --git a/src/Components/TabPanels/UserPageTabs/ModalExcluirConta.js b/src/Components/TabPanels/UserPageTabs/ModalExcluirConta.js
index 05c08553ec5aa93fbc965266cf89dacf0f59bbd0..1d4410498bd71d489e4d8ccd9a3284bb8f890662 100644
--- a/src/Components/TabPanels/UserPageTabs/ModalExcluirConta.js
+++ b/src/Components/TabPanels/UserPageTabs/ModalExcluirConta.js
@@ -23,15 +23,13 @@ import Modal from '@material-ui/core/Modal';
 import Backdrop from '@material-ui/core/Backdrop';
 import Fade from '@material-ui/core/Fade';
 import styled from 'styled-components'
-import axios from 'axios'
-import {apiUrl} from '../../../env.js'
 import CloseIcon from '@material-ui/icons/Close';
 import ExcluirAvatar from '../../../img/Excluir.png'
 import GreyButton from '../../GreyButton'
 import FormInput from '../../FormInput'
 import {Link} from 'react-router-dom'
 import SnackbarComponent from '../../SnackbarComponent.js'
-import {getAxiosConfig} from '../../HelperFunctions/getAxiosConfig'
+import {deleteRequest} from '../../HelperFunctions/getAxiosConfig'
 
 function CloseModalButton (props) {
     return (
@@ -64,20 +62,16 @@ export default function ModalExcluirConta (props) {
 
     const deletedAccountText = `A conta ${state.currentUser.email} foi deletada com sucesso`
 
+    function handleSuccess (data) {
+        toggleSnackbar(true)
+        dispatch({
+          type: "USER_DELETED_ACCOUNT",
+        });
+        props.handleClose()
+    }
     const deleteAccount = () => {
-        let config = getAxiosConfig()
-
-        axios.delete( (`${apiUrl}/auth/`), config
-        ).then( (response) => {
-            console.log(response)
-            toggleSnackbar(true)
-
-            dispatch({
-              type: "USER_DELETED_ACCOUNT",
-            });
-
-            props.handleClose()
-        }, (error) => {console.log(error);})
+        const url = `/auth`
+        deleteRequest(url, handleSuccess, (error) => {console.log(error)})
     }
 
     return (
diff --git a/src/Components/TabPanels/UserPageTabs/PanelAtividades.js b/src/Components/TabPanels/UserPageTabs/PanelAtividades.js
index 0c9d8da9915f980bbc58bae8ca3db6329852fbad..d43ce0da3f4f9023da4def6794f69cadf3195c3e 100644
--- a/src/Components/TabPanels/UserPageTabs/PanelAtividades.js
+++ b/src/Components/TabPanels/UserPageTabs/PanelAtividades.js
@@ -20,13 +20,12 @@ import React, {useState, useEffect} from 'react'
 import styled from 'styled-components'
 import Paper from '@material-ui/core/Paper';
 import Button from '@material-ui/core/Button';
-import axios from 'axios'
-import {apiUrl, apiDomain} from '../../../env';
+import {apiDomain} from '../../../env';
 import Bolo from '../../../img/Bolo.png'
 import LoadingSpinner from '../../LoadingSpinner.js'
 import ActivityListItem from '../../ActivityListItem.js'
 import List from '@material-ui/core/List';
-import {getAxiosConfig} from '../../HelperFunctions/getAxiosConfig.js'
+import {getRequest} from '../../HelperFunctions/getAxiosConfig.js'
 
 export default function TabPanelAtividades (props) {
     const [loading, handleLoading] = useState(true)
@@ -40,25 +39,18 @@ export default function TabPanelAtividades (props) {
         setNotificationsSlice(notifications.slice(0, sliceLength + offset))
     }
 
-    useEffect( () => {
-        let config = getAxiosConfig()
+    function handleSuccess (data) {
+        setNotifications(data)
+        setNotificationsSlice(data.slice(0,30))
+        setLength(data.length)
 
-        axios.get(`${apiUrl}/feed?offset=0&limit=30`, config)
-        .then( (response) => {
-                if ( response.headers['access-token'] ) {
-                    sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-                }
+        handleLoading(false)
+    }
+    useEffect( () => {
+        const url = `/feed?offset=0&limit=30`
 
-                setNotifications(response.data)
-                setNotificationsSlice(response.data.slice(0,30))
-                setLength(response.data.length)
+        getRequest(url, handleSuccess, (error) => {console.log(error)})
 
-                handleLoading(false)
-            },
-            (error) => {
-                console.log(error)
-            }
-        )
     }, [])
 
     return (
@@ -224,4 +216,4 @@ const DivTitulo = styled.div`
     line-height: 1.2em;
     margin : 0;
     border-bottom: 1px solid #eee;
-`
\ No newline at end of file
+`
diff --git a/src/Components/TabPanels/UserPageTabs/PanelColecoes.js b/src/Components/TabPanels/UserPageTabs/PanelColecoes.js
index 0e3654a5e9d73f7eec7c73de968a16c4bbd00e7b..a6ec0c91cf89e1e6fd8ee9afed41d9c250be1d1a 100644
--- a/src/Components/TabPanels/UserPageTabs/PanelColecoes.js
+++ b/src/Components/TabPanels/UserPageTabs/PanelColecoes.js
@@ -20,11 +20,8 @@ import React, { useState, useEffect } from 'react'
 import styled from 'styled-components'
 import Grid from '@material-ui/core/Grid';
 import LoadingSpinner from '../../LoadingSpinner.js'
-import axios from 'axios'
-import { apiUrl } from '../../../env';
 import PanelTemplateColecao from '../PanelComponents/TemplateColecao.js'
 import PaginaVaziaColecao from '../../../img/Pagina_vazia_colecao.png'
-
 import NoContent from '../PanelComponents/NoContent.js'
 import { WhiteContainer, StyledGrid } from '../StyledComponents.js'
 import CreateNewFolderIcon from '@material-ui/icons/CreateNewFolder';
@@ -32,6 +29,7 @@ import Title from '../PanelComponents/PanelTitle.js'
 import CollectionCardFunction from '../../CollectionCardFunction.js'
 import { ButtonsAreaColecao } from '../PanelComponents/ButtonsArea'
 import CriarColecaoModal from '../../CriarColecaoModal.js'
+import {fetchAllRequest} from '../../HelperFunctions/getAxiosConfig'
 
 export default function TabPanelColecoes(props) {
     const [loading, handleLoading] = useState(true)
@@ -42,30 +40,18 @@ export default function TabPanelColecoes(props) {
     const [followedCollections, setFollowedCollections] = useState([])
     const [followedCollectionsSlice, setFollowedCollectionsSlice] = useState([])
 
-    const getInfo = () => {
-        axios.all([
-            axios.get((`${apiUrl}/users/` + props.id + '/collections'), props.config),
-            axios.get((`${apiUrl}/users/` + props.id + '/following/Collection'), props.config),
-        ])
-            .then((responseArr) => {
-                console.log('responseArr Colecoes: ', responseArr)
-                if (responseArr[1].headers['access-token']) {
-                    sessionStorage.setItem('@portalmec/accessToken', responseArr[1].headers['access-token'])
-                }
-
-                handleLoading(false)
-                setUserCollections(responseArr[0].data)
-                setUserCollectionsSlice(responseArr[0].data.slice(0, 3))
+    function handleSuccess (responseArr) {
+        handleLoading(false)
+        setUserCollections(responseArr[0])
+        setUserCollectionsSlice(responseArr[0].slice(0,3))
 
-                setFollowedCollections(responseArr[1].data)
-                setFollowedCollectionsSlice(responseArr[1].data.slice(0, 4))
+        setFollowedCollections(responseArr[1])
+        setFollowedCollectionsSlice(responseArr[1].slice(0,4))
+    }
 
-            },
-                (error) => {
-                    handleLoading(false)
-                    console.log('error while running axios all')
-                }
-            )
+    const getInfo = () => {
+        const urls = [`/users/${props.id}/collections`, `/users/${props.id}/following/Collection`]
+        fetchAllRequest(urls, handleSuccess, (error) => {console.log(error)})
     }
 
     useEffect(() => {
diff --git a/src/Components/TabPanels/UserPageTabs/PanelCuradoria.js b/src/Components/TabPanels/UserPageTabs/PanelCuradoria.js
index 06ea8fd64e432c03d9e78cb5c6db9a0e42164c37..796bee8acd0ae4dcf601ff3ebcbd1253199e80cd 100644
--- a/src/Components/TabPanels/UserPageTabs/PanelCuradoria.js
+++ b/src/Components/TabPanels/UserPageTabs/PanelCuradoria.js
@@ -17,10 +17,9 @@ You should have received a copy of the GNU Affero General Public License
 along with Plataforma Integrada MEC.  If not, see <http://www.gnu.org/licenses/>.*/
 
 import React, {useState, useEffect} from 'react'
-import axios from 'axios'
-import {apiUrl} from '../../../env';
 import LoadingSpinner from '../../LoadingSpinner.js'
 import TemplateCuradoria from '../PanelComponents/TemplateCuradoria.js'
+import {getRequest} from '../../HelperFunctions/getAxiosConfig'
 
 export default function TabPanelCuradoria (props) {
     const [loading, handleLoading] = useState(true)
@@ -35,19 +34,15 @@ export default function TabPanelCuradoria (props) {
 
     const showAllSubmissions = () => {setSubmissionsSlice(submissions)}
 
+    function handleSuccess (data) {
+        handleLoading(false)
+        setSubmissions(data)
+        setSubmissionsSlice(data.slice(0,4))
+    }
     useEffect( () => {
-        axios.get( (`${apiUrl}/users/` + props.id + '/submissions?offset=0&status=submitted'), props.config)
-            .then(response => {
-                console.log(response)
-                if (response.headers['access-token']) {
-                    sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-                }
-
-                handleLoading(false)
-                setSubmissions(response.data)
-                setSubmissionsSlice(response.data.slice(0,4))
+        const url = `/users/${props.id}/submissions?offset=0&status=submitted`
 
-            }, error => {console.log('error while running ComponentDidMout on TabPanelCuradoria')})
+        getRequest(url, handleSuccess, (error) => {console.log(error)})
     }, [])
 
     return (
diff --git a/src/Components/TabPanels/UserPageTabs/PanelEditarPerfil.js b/src/Components/TabPanels/UserPageTabs/PanelEditarPerfil.js
index 9e0560fdd69027c17e4772c4e47008e41fe44d16..ce61ebca4117fedbbce05de52d8133c7fc6293ef 100644
--- a/src/Components/TabPanels/UserPageTabs/PanelEditarPerfil.js
+++ b/src/Components/TabPanels/UserPageTabs/PanelEditarPerfil.js
@@ -25,13 +25,13 @@ import IconButton from '@material-ui/core/IconButton';
 import PhotoCamera from '@material-ui/icons/PhotoCamera';
 import Tooltip from '@material-ui/core/Tooltip';
 import FormInput from "../../FormInput.js"
-import ValidateUserInput from '../../FormValidationFunction.js'
+import ValidateUserInput from '../../HelperFunctions/FormValidationFunction.js'
 import {apiDomain} from '../../../env.js'
-
+import ModalAlterarCover from '../../ModalAlterarCover/ModalAlterarCover.js'
 
 export default function TabPanelEditarPerfil (props) {
     // eslint-disable-next-line
-    const {state, dispatch} = useContext(Store)
+    const {state} = useContext(Store)
     const [hoverAlterarFoto, handleAlterarFoto] = React.useState(false)
 
     const [formNome, setNome] = useState({
@@ -48,9 +48,16 @@ export default function TabPanelEditarPerfil (props) {
         handleAlterarFoto(!hoverAlterarFoto)
     }
 
+    const [tempCover, setTempCover] = useState('')
+
+    const [open, toggleOpen] = useState(false)
+    const controlModal = () => {toggleOpen(!open)}
+
     const updateCover = (selectorFiles) => {
-        console.log(selectorFiles)
-        console.log(selectorFiles[0].name)
+        const objectURL = URL.createObjectURL(selectorFiles[0])
+        console.log(objectURL)
+        setTempCover(objectURL)
+        controlModal()
     }
 
     const handleChange = (e, type) => {
@@ -69,7 +76,7 @@ export default function TabPanelEditarPerfil (props) {
                 key : flag,
                 value : userInput,
             })
-            
+
         }
     }
 
@@ -98,69 +105,77 @@ export default function TabPanelEditarPerfil (props) {
     }
 
     return (
-        <div className="card-config">
-            <h1 style={{fontWeight:"300"}}>Editar Perfil </h1>
-                <div className='content-div'>
-                    <div style={{padding:"0", display:"flex", flexDirection:"column"}}>
-                        <HeaderContainer>
-                            <div style={{position:"relative", height:"100%"}}>
-                                <img src={`${apiDomain}` + state.currentUser.cover_file_name} alt="user cover avatar" style={{width:"100%", height:"100%", objectFit:"cover"}}/>
-                                <input accept="image/*" style = {{display:"none"}} id="icon-button-file" type="file" onChange={(e) => updateCover(e.target.files)}/>
-                                <label htmlFor="icon-button-file">
-                                    <Tooltip title={<span style={{fontSize:"14px", overflow:"hidden", transition:"all .5s ease"}}>ALTERAR CAPA</span>} placement="left">
-                                        <IconButton style={{position:"absolute",right:"0",top:"0",color:"#fff"}}color="primary" aria-label="upload picture" component="span">
-                                            <PhotoCamera />
-                                        </IconButton>
-                                    </Tooltip>
-                                </label>
-                            </div>
-                            <ProfileAvatarDiv onMouseEnter={handleHoverAlterarFoto} onMouseLeave={handleHoverAlterarFoto}>
-                                <img src={`${apiDomain}` + state.currentUser.avatar_file_name} alt = "user avatar" style={{border:"0", verticalAlign:"middle"}}/>
-                                <ChangeAvatarDiv  style={ {display : hoverAlterarFoto ? 'flex' : 'none'}}>
-                                    <span>Alterar Foto</span>
-                                </ChangeAvatarDiv>
-                            </ProfileAvatarDiv>
-                        </HeaderContainer>
-                        <br/>
-                        <br/>
-                        <br/>
-                        <br/>
-                    </div>
+        <React.Fragment>
+            <ModalAlterarCover
+                open = {open}
+                handleClose={controlModal}
+                cover={tempCover}
+                id={state.currentUser.id}
+            />
+            <div className="card-config">
+                <h1 style={{fontWeight:"300"}}>Editar Perfil </h1>
+                    <div className='content-div'>
+                        <div style={{padding:"0", display:"flex", flexDirection:"column"}}>
+                            <HeaderContainer>
+                                <div style={{position:"relative", height:"100%"}}>
+                                    <img src={`${apiDomain}` + state.currentUser.cover} alt="user cover avatar" style={{width:"100%", height:"100%", objectFit:"cover"}}/>
+                                    <input accept="image/*" style = {{display:"none"}} id="icon-button-file" type="file" onChange={(e) => updateCover(e.target.files)}/>
+                                    <label htmlFor="icon-button-file">
+                                        <Tooltip title={<span style={{fontSize:"14px", overflow:"hidden", transition:"all .5s ease"}}>ALTERAR CAPA</span>} placement="left">
+                                            <IconButton style={{position:"absolute",right:"0",top:"0",color:"#fff"}}color="primary" aria-label="upload picture" component="span">
+                                                <PhotoCamera />
+                                            </IconButton>
+                                        </Tooltip>
+                                    </label>
+                                </div>
+                                <ProfileAvatarDiv onMouseEnter={handleHoverAlterarFoto} onMouseLeave={handleHoverAlterarFoto}>
+                                    <img src={`${apiDomain}` + state.currentUser.avatar} alt = "user avatar" style={{border:"0", verticalAlign:"middle"}}/>
+                                    <ChangeAvatarDiv  style={ {display : hoverAlterarFoto ? 'flex' : 'none'}}>
+                                        <span>Alterar Foto</span>
+                                    </ChangeAvatarDiv>
+                                </ProfileAvatarDiv>
+                            </HeaderContainer>
+                            <br/>
+                            <br/>
+                            <br/>
+                            <br/>
+                        </div>
 
-                    <div style={{paddingTop:"90px"}}>
-                        <div style={{display:"flex", flexDirection:"row"}}>
-                            <form onSubmit={e => handleSubmit(e)}>
-                                <FormInput
-                                    inputType={"text"}
-                                    name={"Nome Completo"}
-                                    value={formNome.value}
-                                    placeholder={"Nome Completo"}
-                                    handleChange={e => handleChange(e, 'username')}
-                                    required={true}
-                                    error={formNome.key}
-                                />
-                                <FormInput
-                                    inputType={"text"}
-                                    name={"Sobre Mim"}
-                                    value={formAboutMe.value}
-                                    multi = {true}
-                                    rows="3"
-                                    rowsMax = "3"
-                                    error={formAboutMe.key}
-                                    placeholder={"Sobre Mim"}
-                                    handleChange={e => handleChange(e, 'aboutMe')}
-                                    required={false}
-                                    help = {formAboutMe.value.length + '/160'}
-                                />
-                            </form>
+                        <div style={{paddingTop:"90px"}}>
+                            <div style={{display:"flex", flexDirection:"row"}}>
+                                <form onSubmit={e => handleSubmit(e)}>
+                                    <FormInput
+                                        inputType={"text"}
+                                        name={"Nome Completo"}
+                                        value={formNome.value}
+                                        placeholder={"Nome Completo"}
+                                        handleChange={e => handleChange(e, 'username')}
+                                        required={true}
+                                        error={formNome.key}
+                                    />
+                                    <FormInput
+                                        inputType={"text"}
+                                        name={"Sobre Mim"}
+                                        value={formAboutMe.value}
+                                        multi = {true}
+                                        rows="3"
+                                        rowsMax = "3"
+                                        error={formAboutMe.key}
+                                        placeholder={"Sobre Mim"}
+                                        handleChange={e => handleChange(e, 'aboutMe')}
+                                        required={false}
+                                        help = {formAboutMe.value.length + '/160'}
+                                    />
+                                </form>
+                            </div>
+                            <ButtonsDiv>
+                                <Link to="perfil" ><ButtonCancelar ><span>CANCELAR</span></ButtonCancelar></Link>
+                                <ButtonConfirmar onClick={e => handleSubmit(e)}><span>SALVAR ALTERAÇÕES</span></ButtonConfirmar>
+                            </ButtonsDiv>
                         </div>
-                        <ButtonsDiv>
-                            <Link to="perfil" ><ButtonCancelar ><span>CANCELAR</span></ButtonCancelar></Link>
-                            <ButtonConfirmar onClick={e => handleSubmit(e)}><span>SALVAR ALTERAÇÕES</span></ButtonConfirmar>
-                        </ButtonsDiv>
-                    </div>
-                </div >
-        </div>
+                    </div >
+            </div>
+        </React.Fragment>
     )
 }
 
diff --git a/src/Components/TabPanels/UserPageTabs/PanelFavoritos.js b/src/Components/TabPanels/UserPageTabs/PanelFavoritos.js
index 75c96c274591601bbae7f9aecdda802ed2b1a56b..4edaf7482aefccfad045c1a43ed26acdcf4e15f1 100644
--- a/src/Components/TabPanels/UserPageTabs/PanelFavoritos.js
+++ b/src/Components/TabPanels/UserPageTabs/PanelFavoritos.js
@@ -17,11 +17,10 @@ You should have received a copy of the GNU Affero General Public License
 along with Plataforma Integrada MEC.  If not, see <http://www.gnu.org/licenses/>.*/
 
 import React, {useState, useEffect} from 'react'
-import axios from 'axios'
-import {apiUrl} from '../../../env';
 import LoadingSpinner from '../../LoadingSpinner.js'
 import Template from '../PanelComponents/TemplateRecurso.js'
 import PanelTemplateColecao from '../PanelComponents/TemplateColecao.js'
+import {fetchAllRequest} from '../../HelperFunctions/getAxiosConfig'
 
 export default function TabPanelFavoritos (props) {
     const [loading, handleLoading] = useState(true)
@@ -32,29 +31,21 @@ export default function TabPanelFavoritos (props) {
     const [likedCollections, setlikedCollections] = useState([])
     const [likedCollectionsSlice, setlikedCollectionsSlice] = useState([])
 
+    function handleSuccess (responseArr) {
+        setlikedLearnObjs(responseArr[0])
+        setlikedLearnObjsSlice(responseArr[0].slice(0,4))
+
+        setlikedCollections(responseArr[1])
+        setlikedCollectionsSlice(responseArr[1].slice(0,4))
+
+        handleLoading(false)
+    }
+
     useEffect( () => {
-        axios.all([
-            axios.get((`${apiUrl}/users/` + props.id + '/learning_objects/liked'), props.config),
-            axios.get((`${apiUrl}/users/` + props.id + '/collections/liked'), props.config),
-        ])
-        .then( (responseArr) => {
-                console.log('responseArr favoritos: ', responseArr)
-                if (responseArr[0].headers['access-token']) {
-                    sessionStorage.setItem('@portalmec/accessToken', responseArr[0].headers['access-token'])
-                }
-                setlikedLearnObjs(responseArr[0].data)
-                setlikedLearnObjsSlice(responseArr[0].data.slice(0,4))
-
-                setlikedCollections(responseArr[1].data)
-                setlikedCollectionsSlice(responseArr[1].data.slice(0,4))
-
-                handleLoading(false)
-            },
-            (error) => {
-                handleLoading(false)
-                console.log('error while running axios all')
-            }
-        )
+        const urls = [ `/users/${props.id}/learning_objects/liked`, `/users/${props.id}/collections/liked`]
+
+        fetchAllRequest(urls, handleSuccess, (error) => {console.log(error)})
+
     }, [])
 
     const showMoreLikedLearnObj = () => {
diff --git a/src/Components/TabPanels/UserPageTabs/PanelGerenciarConta.js b/src/Components/TabPanels/UserPageTabs/PanelGerenciarConta.js
index 421cadcd8bc676243b9147e06b3c00b31f545069..0207eb9f2bfe9a7002cb841581fef44b0dab2e41 100644
--- a/src/Components/TabPanels/UserPageTabs/PanelGerenciarConta.js
+++ b/src/Components/TabPanels/UserPageTabs/PanelGerenciarConta.js
@@ -21,7 +21,7 @@ import Paper from '@material-ui/core/Paper';
 import FormInput from "../../FormInput.js"
 import {CompletarCadastroButton} from './PanelSolicitarContaProfessor.js'
 import {ButtonCancelar} from './PanelEditarPerfil.js'
-import ValidateUserInput from '../../FormValidationFunction.js'
+import ValidateUserInput from '../../HelperFunctions/FormValidationFunction.js'
 import ModalExcluirConta from './ModalExcluirConta.js'
 
 export default function TabPanelGerenciarConta (props) {
diff --git a/src/Components/TabPanels/UserPageTabs/PanelMeusRecursos.js b/src/Components/TabPanels/UserPageTabs/PanelMeusRecursos.js
index 3d9c93d09707c27216f21b79fefc1ba8567b7d48..05668209a684f2c82ba2cadf6f7bd53ceb5da893 100644
--- a/src/Components/TabPanels/UserPageTabs/PanelMeusRecursos.js
+++ b/src/Components/TabPanels/UserPageTabs/PanelMeusRecursos.js
@@ -17,11 +17,10 @@ You should have received a copy of the GNU Affero General Public License
 along with Plataforma Integrada MEC.  If not, see <http://www.gnu.org/licenses/>.*/
 
 import React, {useState, useEffect} from 'react'
-import axios from 'axios'
-import {apiUrl} from '../../../env';
 import LoadingSpinner from '../../LoadingSpinner.js'
 import Template from '../PanelComponents/TemplateRecurso.js'
 import TemplateCuradoria from '../PanelComponents/TemplateCuradoria.js'
+import {fetchAllRequest} from '../../HelperFunctions/getAxiosConfig'
 
 export default function TabPanelAtividades (props) {
     const [loading, handleLoading] = useState(true)
@@ -35,34 +34,27 @@ export default function TabPanelAtividades (props) {
     const [curating, setCurating] = useState([]);
     const [curatingSlice, setCuratingSlice] = useState([])
 
+    function handleSuccess (responseArr) {
+        setLearningObjects(responseArr[0])
+        setLearningObjectsSlice(responseArr[0].slice(0, 4))
+
+        setDrafts(responseArr[1])
+        setDraftsSlice(responseArr[1].slice(0, 4))
+
+        setCurating(responseArr[2])
+        setCuratingSlice(responseArr[2].slice(0, 4))
+
+        handleLoading(false)
+    }
+
     useEffect( () => {
-        axios.all([
-            axios.get((`${apiUrl}/users/` + props.id + '/learning_objects'), props.config),
-            axios.get((`${apiUrl}/users/` + props.id + '/drafts'), props.config),
-            axios.get((`${apiUrl}/users/` + props.id + '/submissions?status=submitted'), props.config)
-        ])
-        .then( (responseArr) => {
-                console.log('responseArr Meus recursos: ', responseArr)
-                if (responseArr[0].headers['access-token']) {
-                    sessionStorage.setItem('@portalmec/accessToken', responseArr[0].headers['access-token'])
-                }
-
-                setLearningObjects(responseArr[0].data)
-                setLearningObjectsSlice(responseArr[0].data.slice(0, 4))
-
-                setDrafts(responseArr[1].data)
-                setDraftsSlice(responseArr[1].data.slice(0, 4))
-
-                setCurating(responseArr[2].data)
-                setCuratingSlice(responseArr[2].data.slice(0, 4))
-
-                handleLoading(false)
-            },
-            (error) => {
-                handleLoading(false)
-                console.log('error while running axios all')
-            }
-        )
+        const urls = [
+            `/users/${props.id}/learning_objects`,
+            `/users/${props.id}/drafts`,
+            `/users/${props.id}/submissions?status=submitted`
+        ]
+
+        fetchAllRequest(urls, handleSuccess, (error) => {console.log(error)})
     }, [])
 
     const showMoreLearnObj = () => {
diff --git a/src/Components/TabPanels/UserPageTabs/PanelRede.js b/src/Components/TabPanels/UserPageTabs/PanelRede.js
index 464b40c3e7d96edc88a9a74882b60c7b71098e3e..fdebcbf9f4f2f85af5f39e26046c9af2cc442e71 100644
--- a/src/Components/TabPanels/UserPageTabs/PanelRede.js
+++ b/src/Components/TabPanels/UserPageTabs/PanelRede.js
@@ -17,11 +17,10 @@ You should have received a copy of the GNU Affero General Public License
 along with Plataforma Integrada MEC.  If not, see <http://www.gnu.org/licenses/>.*/
 
 import React, {useState, useEffect} from 'react'
-import axios from 'axios'
-import {apiUrl} from '../../../env';
 import LoadingSpinner from '../../LoadingSpinner.js'
 import ContainerRedeVazia from './ContainerRedeVazia.js'
 import PanelTemplateRede from '../PanelComponents/TemplateRede.js'
+import {fetchAllRequest} from '../../HelperFunctions/getAxiosConfig'
 
 export default function TabPanelRede (props) {
     const [loading, handleLoading] = useState(true)
@@ -44,32 +43,25 @@ export default function TabPanelRede (props) {
     }
     const showAllFollowers = () => {setFollowersSlice(followersList)}
 
+    function handleSuccess (responseArr) {
+        console.log(responseArr)
+        setFollowing(responseArr[0])
+        setFollowingSlice(responseArr[0].slice(0,4))
+
+
+        setFollowers(responseArr[1])
+        setFollowersSlice(responseArr[1].slice(0,4))
+
+        handleLoading(false)
+    }
 
     useEffect( () => {
-        axios.all([
-            axios.get((`${apiUrl}/users/` + props.id + '/following/User'), props.config),
-            axios.get((`${apiUrl}/users/` + props.id + '/followers'), props.config)
-        ])
-        .then( (responseArr) => {
-                console.log('responseArr Rede: ', responseArr)
-                if (responseArr[0].headers['access-token']) {
-                    sessionStorage.setItem('@portalmec/accessToken', responseArr[0].headers['access-token'])
-                }
-
-                setFollowing(responseArr[0].data)
-                setFollowingSlice(responseArr[0].data.slice(0,4))
-
-
-                setFollowers(responseArr[1].data)
-                setFollowersSlice(responseArr[1].data.slice(0,4))
-
-                handleLoading(false)
-            },
-            (error) => {
-                handleLoading(false)
-                console.log('error while running axios all')
-            }
-        )
+        const urls = [
+            `/users/${props.id}/following/User`,
+            `/users/${props.id}/followers`
+        ]
+
+        fetchAllRequest(urls, handleSuccess, (error) => {console.log(error)})
     }, [])
 
     return (
@@ -96,7 +88,6 @@ export default function TabPanelRede (props) {
                         )
                         :
                         (
-                            [
                                 <React.Fragment>
                                     <PanelTemplateRede
                                         title={followersList.length === 1 ? "Seguidor" : "Seguidores"}
@@ -119,7 +110,6 @@ export default function TabPanelRede (props) {
                                     />
                                 </React.Fragment>
 
-                            ]
                         )
                     }
                     </>
diff --git a/src/Components/TabPanels/UserPageTabs/PanelSolicitarContaProfessor.js b/src/Components/TabPanels/UserPageTabs/PanelSolicitarContaProfessor.js
index 769977a5e3fc95490fa1c257a059f9dc1719a073..3e0fe1c7a7382116d02fbab3aeb0c44423393605 100644
--- a/src/Components/TabPanels/UserPageTabs/PanelSolicitarContaProfessor.js
+++ b/src/Components/TabPanels/UserPageTabs/PanelSolicitarContaProfessor.js
@@ -35,7 +35,6 @@ export default function TabPanelSolicitarContaProfessor (props) {
                 {
                     state.currentUser.submitter_request === 'default' || state.currentUser.submitter_request === 'rejected' ?
                     (
-                        [
                             <div style={{paddingLeft:"100px", paddingRight:"101px"}}>
                                 <ImageDiv/>
                                 <StyledH2>Você é professor(a) da educação básica e gostaria de colaborar com a Plataforma?</StyledH2>
@@ -48,28 +47,21 @@ export default function TabPanelSolicitarContaProfessor (props) {
                                     </CompletarCadastroButton>
                                 </div>
                             </div>
-                        ]
                     )
                     :
                     (
-                        [
                             <>
                             {
                                 state.currentUser.submitter_request === 'requested' ?
                                 (
-                                    [
                                         <span>Requested</span>
-                                    ]
                                 )
                                 :
                                 (
-                                    [
                                         <span>Professor</span>
-                                    ]
                                 )
                             }
                             </>
-                        ]
                     )
                 }
             </div>
diff --git a/src/Components/UploadPageComponents/ButtonsDiv.js b/src/Components/UploadPageComponents/ButtonsDiv.js
index 975017b04f81bfccc588aa30fbc46ee0e35bdcdc..b6aaaa3c829fa41698743a5fe720b9fd82c06148 100644
--- a/src/Components/UploadPageComponents/ButtonsDiv.js
+++ b/src/Components/UploadPageComponents/ButtonsDiv.js
@@ -21,6 +21,7 @@ import ModalCancelar from './ModalCancelar.js'
 import { GreyButton, OrangeButton } from './StyledComponents';
 import Grid from '@material-ui/core/Grid';
 import {Redirect} from 'react-router-dom'
+
 export default function ButtonsDiv (props) {
     const [modalCancelar, toggleModalCancelar] = useState(false)
     const [redirectTrue, toggleRedirect] = useState(false)
diff --git a/src/Components/UploadPageComponents/DragAndDrop.tsx b/src/Components/UploadPageComponents/DragAndDrop.tsx
deleted file mode 100644
index d416b22257648c2c500ef0cb85150e7acfacae20..0000000000000000000000000000000000000000
--- a/src/Components/UploadPageComponents/DragAndDrop.tsx
+++ /dev/null
@@ -1,153 +0,0 @@
-/*Copyright (C) 2019 Centro de Computacao Cientifica e Software Livre
-Departamento de Informatica - Universidade Federal do Parana
-
-This file is part of Plataforma Integrada MEC.
-
-Plataforma Integrada MEC is free software: you can redistribute it and/or modify
-it under the terms of the GNU Affero General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-Plataforma Integrada MEC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU Affero General Public License for more details.
-
-You should have received a copy of the GNU Affero General Public License
-along with Plataforma Integrada MEC.  If not, see <http://www.gnu.org/licenses/>.*/
-
-import React, {useState, useEffect} from 'react'
-import CloudUploadIcon from '@material-ui/icons/CloudUpload';
-import {DottedBox, BlueButton} from './StyledComponents.js';
-import FileToUpload from './FileToUpload'
-import {getAxiosConfig} from '../HelperFunctions/getAxiosConfig.js'
-import AddAPhotoIcon from '@material-ui/icons/AddAPhoto';
-
-type Props = {
-    draftID : string;
-}
-
-const UploadMediaComponent: React.FC<Props> = ({draftID, children}) => {
-    const [filesToUpload, setFilesToUpload] = useState<FileToUpload | undefined>(undefined);
-
-    const onFileChange = (e: React.ChangeEvent<HTMLInputElement>) => {
-        const files: FileList | null = e.target.files;
-        if(!files) return;
-
-        let fileToUpload: FileToUpload = new FileToUpload(files[0], files[0].name, draftID);
-
-        setFilesToUpload(fileToUpload);
-        if (fileToUpload != undefined){
-            console.log(fileToUpload.uploadFile())
-
-        }
-    };
-
-    return (
-        <div className="upload-container">
-            <h2 className="upload-title">File Uploader</h2>
-            <div className="upload-form">
-                <form id="file_upload">
-                    <DottedBox
-
-                        >
-                        <AddAPhotoIcon className="icon"/>
-                        <input
-                            type="file"
-                            onChange = {onFileChange}
-                            id="upload-file-thumbnail"
-                            style={{display : "none"}}
-                            />
-                        <BlueButton>
-                            <label htmlFor="upload-file-thumbnail" style={{width : "inherit", cursor : "pointer"}}>
-                                ESCOLHER IMAGEM
-                            </label>
-                        </BlueButton>
-                        <span style={{marginTop : "6px"}}>Ou arrastar e soltar o arquivo aqui</span>
-                    </DottedBox>
-                </form>
-            </div>
-        </div>
-    )
-}
-UploadMediaComponent.displayName = 'UploadMedia';
-export default UploadMediaComponent;
-
-{/*<div className="upload-file-select">
-    <label htmlFor="file_1">Select files for upload</label>
-    <input id="file_1" type="file" multiple onChange={onFileChange}/>
-</div>
-
-<div className="upload-file-list">
-    {filesToUpload.map((f,i) => <div className="upload-file" key={i}>{f.name} - {f.file.size}bytes</div>)}
-</div>
-
-<div className="upload-submit">
-    <input type="submit" value="submit"/>
-</div>*/}
-
-{/*
-    const [dropDepth, setDropDepth] = useState(0)
-    const [inDropZone, toggleInDropZone] = useState(false)
-    const [fileList, setFileList] = useState([])
-
-    const handleDragEnter = e => {
-        e.preventDefault();
-        e.stopPropagation();
-
-        setDropDepth(dropDepth + 1)
-    };
-
-    const handleDragLeave = e => {
-        e.preventDefault();
-        e.stopPropagation();
-
-        setDropDepth(dropDepth - 1)
-        if (dropDepth > 0)
-            toggleInDropZone(true)
-    };
-
-    const handleDragOver = e => {
-        e.preventDefault();
-        e.stopPropagation();
-        e.dataTransfer.dropEffect = 'copy';
-        toggleInDropZone(true)
-    };
-
-    const handleDrop = e => {
-        e.preventDefault();
-        e.stopPropagation();
-        let files = [...e.dataTransfer.files]
-
-        if (files && files.length > 0) {
-            props.acceptFile(files[0])
-        }
-    };
-
-    const handleUpload = (e, selectorFiles : FileList) => {
-        e.preventDefault();
-        props.acceptFile(selectorFiles[0])
-    }
-
-
-    <DottedBox
-    onDrop={e => handleDrop(e)}
-    onDragOver={e => handleDragOver(e)}
-    onDragEnter={e => handleDragEnter(e)}
-    onDragLeave={e => handleDragLeave(e)}
-    >
-    <CloudUploadIcon className="icon"/>
-    <input
-        type="file"
-        onChange = {(e) => handleUpload(e, e.target.files)}
-        id="upload-file"
-        style={{display : "none"}}
-        />
-    <BlueButton>
-        <label htmlFor="upload-file" style={{width : "inherit", cursor : "pointer"}}>
-            ESCOLHER O ARQUIVO
-        </label>
-    </BlueButton>
-    <span style={{marginTop : "6px"}}>Ou arrastar e soltar o arquivo aqui</span>
-</DottedBox>
-    */}
diff --git a/src/Components/UploadPageComponents/FileToUpload.ts b/src/Components/UploadPageComponents/FileToUpload.ts
index 0fba0fc8204700a5e47bdd98516b8aa474e98133..fddbf404078bdb1eed4d04a666955d63ccdbac87 100644
--- a/src/Components/UploadPageComponents/FileToUpload.ts
+++ b/src/Components/UploadPageComponents/FileToUpload.ts
@@ -1,3 +1,21 @@
+/*Copyright (C) 2019 Centro de Computacao Cientifica e Software Livre
+Departamento de Informatica - Universidade Federal do Parana
+
+This file is part of Plataforma Integrada MEC.
+
+Plataforma Integrada MEC is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Plataforma Integrada MEC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with Plataforma Integrada MEC.  If not, see <http://www.gnu.org/licenses/>.*/
+
 export default class FileToUpload {
     static chunkSize = 262144;
     readonly request: XMLHttpRequest;
diff --git a/src/Components/UploadPageComponents/FileUploadStage.js b/src/Components/UploadPageComponents/FileUploadStage.js
index 5419bb3f7ce1dfc0574a3965c32ede36a7fcd425..880ff018ef65d34cdf952b8829dedfd819f647b6 100644
--- a/src/Components/UploadPageComponents/FileUploadStage.js
+++ b/src/Components/UploadPageComponents/FileUploadStage.js
@@ -21,25 +21,18 @@ import styled from 'styled-components'
 import {WrapperBox} from './StyledComponents.js'
 import DoneIcon from '@material-ui/icons/Done';
 import DeleteIcon from '@material-ui/icons/Delete';
-import {getAxiosConfig} from '../HelperFunctions/getAxiosConfig.js'
-import axios from 'axios'
-import {apiUrl} from '../../env';
+import {deleteRequest} from '../HelperFunctions/getAxiosConfig.js'
 
 export default function FileUploadStage (props) {
     const [uploading, toggleUploading] = useState(true)
 
+    function handleSuccess (data) {
+        props.handleNextStage("default")
+    }
     const handleDelete = () => {
-        let config = getAxiosConfig
+        const url = `/learning_objects/${props.draftID}`
 
-        axios.delete( (`${apiUrl}/learning_objects/` + props.draftID), config).then(
-            (response) => {
-                console.log(response)
-                if ( response.headers['access-token'] ) {
-                    sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-                }
-                props.handleNextStage("default")
-            },
-            (error) => {console.log(error)})
+        deleteRequest(url, handleSuccess, (error) => {console.log(error)})
     }
 
     return (
diff --git a/src/Components/UploadPageComponents/ModalCancelar.js b/src/Components/UploadPageComponents/ModalCancelar.js
index 5906286e347fc1f1261ca592858f2cecda7d8588..9616436b10e683fdb274387b58ff2aed3c8d788b 100644
--- a/src/Components/UploadPageComponents/ModalCancelar.js
+++ b/src/Components/UploadPageComponents/ModalCancelar.js
@@ -22,37 +22,23 @@ import Modal from '@material-ui/core/Modal';
 import Backdrop from '@material-ui/core/Backdrop';
 import Fade from '@material-ui/core/Fade';
 import styled from 'styled-components'
-import axios from 'axios'
-import {apiUrl} from '../../env';
 import {Link} from 'react-router-dom'
+import {deleteRequest} from '../HelperFunctions/getAxiosConfig.js'
 
 export default function ModalCancelar (props) {
+
+    function handleSuccess (data) {
+        props.handleClose()
+        console.log('ir pra home')
+
+    }
     const handleDelete = () => {
-        console.log(props.draftID)
         // {/*delete the draft*/}
         if (props.draftID) {
-            let config = {
-                headers : {
-                    'Accept': 'application/json',
-                    'Content-Type': 'application/json',
-                    'Access-Token': sessionStorage.getItem('@portalmec/accessToken'),
-                    'Client': sessionStorage.getItem('@portalmec/clientToken'),
-                    'Uid': sessionStorage.getItem('@portalmec/uid'),
-                }
-            }
-            axios.delete( (`${apiUrl}/learning_objects/` + props.draftID), config).then(
-                (response) => {
-                    console.log(response)
-                    if ( response.headers['access-token'] ) {
-                        sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-                    }
-                }, (error) => {console.log(error)})
-        }
-        // {/*close modal*/}
-        props.handleClose()
-        // {/*change current page to home page*/}
-        console.log('ir pra home')
+            const url = `/learning_objects/${props.draftID}`
 
+            deleteRequest(url, handleSuccess, (error) => {console.log(error)})
+        }
     }
 
     return (
diff --git a/src/Components/UploadPageComponents/PartOne.js b/src/Components/UploadPageComponents/PartOne.js
index 46540f49752bbf87084cde65ad3c0234a3ca57d4..fbb47cb5b0e325fa01cf5ba7666acd454a398134 100644
--- a/src/Components/UploadPageComponents/PartOne.js
+++ b/src/Components/UploadPageComponents/PartOne.js
@@ -18,10 +18,7 @@ along with Plataforma Integrada MEC.  If not, see <http://www.gnu.org/licenses/>
 
 import React, {useState, useEffect} from 'react'
 import Grid from '@material-ui/core/Grid';
-import axios from 'axios'
-import {apiUrl} from '../../env';
 import ButtonsDiv from './ButtonsDiv.js'
-
 import SobreORecurso from './Forms/SobreORecurso.js'
 import NewTitle from './Forms/NewTitle.js'
 import Keywords from './Forms/Keywords.js'
@@ -29,40 +26,20 @@ import Autor from './Forms/Autor.js'
 import TipoDeRecurso from './Forms/TipoDeRecurso.js'
 import Idioma from './Forms/Idioma.js'
 import {SendInfo} from './SendInfo.js'
+import {getRequest} from '../HelperFunctions/getAxiosConfig.js'
 
 export default function PartOne (props) {
     // {/*const [subjects, setSubjects] = useState([])*/}
     const [languages, setLanguages] = useState([])
     const [objTypes, setObjTypes] = useState([])
 
+    function handleSuccessGetObjTypes (data) {
+        setObjTypes(data.sort((a, b) => (a.name) > (b.name) ? 1 : -1))
+    }
     useEffect( () => {
-        //     {/*get the list of subjects*/}
-        // {/*    axios.get(`${apiUrl}/subjects/`).then(
-        //         (response) => {
-        //             console.log(response.data)
-        //             setSubjects(response.data)
-        //         }, (error) => {
-        //             console.log(error)
-        //         }
-        //     )*/}
-
-            // {/*get the list of object_types*/}
-            axios.get(`${apiUrl}/object_types/`).then(
-                (response) => {
-                    setObjTypes(response.data.sort((a, b) => (a.name) > (b.name) ? 1 : -1))
-                }, (error) => {
-                    console.log(error)
-                }
-            )
-
-            // {/*get the list of languages*/}
-            axios.get(`${apiUrl}/languages/`).then(
-                (response) => {
-                    setLanguages(response.data)
-                }, (error) => {
-                    console.log(error)
-                }
-            )
+            getRequest(`/object_types/`, handleSuccessGetObjTypes, (error) => {console.log(error)})
+
+            getRequest(`/languages/`, (data) => {setLanguages(data)}, (error) => {console.log(error)})
     }, [])
 
     const handleSubmit = () => {
diff --git a/src/Components/UploadPageComponents/PartThree.js b/src/Components/UploadPageComponents/PartThree.js
index 3a2608c70375de6315c940474c126e1323f233f6..3b4b6b81ecbda32d0fa721e0ffc059e0c47f4cff 100644
--- a/src/Components/UploadPageComponents/PartThree.js
+++ b/src/Components/UploadPageComponents/PartThree.js
@@ -20,8 +20,7 @@ import React, {useState, useEffect, useContext} from 'react'
 import {Store} from '../../Store.js'
 import Grid from '@material-ui/core/Grid';
 import styled from 'styled-components'
-import axios from 'axios'
-import {apiUrl, apiDomain} from '../../env';
+import {apiDomain} from '../../env';
 import Stepper from './Stepper.js'
 import Rating from '@material-ui/lab/Rating';
 import StarBorderIcon from '@material-ui/icons/StarBorder';
@@ -34,8 +33,8 @@ import TranslateIcon from '@material-ui/icons/Translate';
 import AssignmentIcon from '@material-ui/icons/Assignment';
 import { GrayButton, OrangeButton} from './StyledComponents';
 import ModalCancelar from './ModalCancelar.js'
-import {getAxiosConfig} from '../HelperFunctions/getAxiosConfig.js'
 import {getDefaultThumbnail} from '../HelperFunctions/getDefaultThumbnail'
+import {getRequest} from '../HelperFunctions/getAxiosConfig.js'
 
 export default function PartThree (props) {
     var moment = require('moment')
@@ -48,24 +47,22 @@ export default function PartThree (props) {
     const [description, setDescription] = useState('')
     const [author, setAuthor] = useState('')
 
+    function handleSuccess (data) {
+        setDraft(data)
+        /*extract subjects*/
+        setSubjects(data.subjects.map((subject)=>(subject.name)).join(', '))
+        setTags(data.tags.map(tag => tag.name))
+        setDescription(data.description)
+        setAuthor(data.author)
+        setLoading(false)
+    }
+
     useEffect(() => {
         if (state.currentUser.id !== "") {
-            const config = getAxiosConfig()
-            axios.get( (`${apiUrl}/learning_objects/` + props.draftID), config
-            ).then( (response) => {
-                console.log(response.data)
-                if ( response.headers['access-token'] ) {
-                    sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-                }
-                setDraft(response.data)
-
-                /*extract subjects*/
-                setSubjects(response.data.subjects.map((subject)=>(subject.name)).join(', '))
-                setTags(response.data.tags.map(tag => tag.name))
-                setDescription(response.data.description)
-                setAuthor(response.data.author)
-                setLoading(false)
-            }, (error) => {console.log(error)})
+            const url = `/learning_objects/${props.draftID}`
+
+            getRequest(url, handleSuccess, (error) => {console.log(error)})
+
         }
     }, [state.currentUser.id])
 
diff --git a/src/Components/UploadPageComponents/PartTwo.js b/src/Components/UploadPageComponents/PartTwo.js
index 02a83da82ea0e4a689d8949d7b063afae5a7435d..6ab05cee54ac0f62067fb87aecde4b16e045df1c 100644
--- a/src/Components/UploadPageComponents/PartTwo.js
+++ b/src/Components/UploadPageComponents/PartTwo.js
@@ -19,8 +19,6 @@ along with Plataforma Integrada MEC.  If not, see <http://www.gnu.org/licenses/>
 import React, {useState, useEffect} from 'react'
 import Grid from '@material-ui/core/Grid';
 import styled from 'styled-components'
-import axios from 'axios'
-import {apiUrl} from '../../env';
 import DragAndDropThumbnail from './PartTwoComponents/DragAndDropThumbnail'
 import EducationalStage from './PartTwoComponents/EducationalStage'
 import Licenca from './PartTwoComponents/Licenca'
@@ -32,9 +30,9 @@ import ButtonsDiv from './ButtonsDiv.js'
 import SubjectsAndThemes from './PartTwoComponents/SubjectsAndThemes.js'
 import {SendInfo} from './SendInfo.js'
 import EditThumbnail from './PartTwoComponents/EditThumbnail.js'
-import {getAxiosConfig} from '../HelperFunctions/getAxiosConfig'
 import DisplayThumbnail from './PartTwoComponents/DisplayThumbnail.js'
 import CustomCircularProgress from './PartTwoComponents/CustomCircularProgress';
+import {getRequest, putRequest} from '../HelperFunctions/getAxiosConfig.js'
 
 export function LoadingDiv () {
     return (
@@ -49,21 +47,15 @@ export default function PartTwo (props) {
     const [subjects, setSubjects] = useState([])
     const [themes, setThemes] = useState([])
 
+    function handleSuccess (data) {
+        setSubjects(data.filter(subject => subject.theme === false).sort((a,b) => a.name > b.name ? 1 : -1))
+        setThemes(data.filter(subject => subject.theme === true).sort((a,b) => a.name > b.name ? 1 : -1))
+    }
+
     useEffect(() => {
-        axios.get(`${apiUrl}/educational_stages/`).then(
-            (response) => {console.log(response);
-                setEduStages(response.data)
-            },
-            (error) => {console.log(error)}
-        )
-
-        axios.get(`${apiUrl}/subjects/`).then(
-            (response) => {console.log(response);
-                setSubjects(response.data.filter(subject => subject.theme === false).sort((a,b) => a.name > b.name ? 1 : -1))
-                setThemes(response.data.filter(subject => subject.theme === true).sort((a,b) => a.name > b.name ? 1 : -1))
-            },
-            (error) => {console.log(error)}
-        )
+        getRequest(`/educational_stages/`, (data) => {setEduStages(data)}, (error) => {console.log(error)})
+
+        getRequest(`/subjects/`, handleSuccess, (error) => {console.log(error)})
     }, [])
 
 
@@ -86,23 +78,17 @@ export default function PartTwo (props) {
      const updateThumb = (newThumbnail) => {
          setThumbnail(newThumbnail)
          console.log(thumbnail)
-
      }
+
      const finalizeThumb = () => {
          setThumbnailStage('uploading')
-         let config = getAxiosConfig()
+
+         const url = `/learning_objects/${props.draftID}`
+
          let fdThumb = new FormData()
          fdThumb.set('learning_object[thumbnail]', thumbnail)
-         axios.put((`${apiUrl}/learning_objects/` + props.draftID), fdThumb, config).then(
-             (response) => {
-                 setThumbnailStage('done')
-                 console.log(response.data)
-                 if ( response.headers['access-token'] ) {
-                     sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-                 }
-             },
-             (error) => {console.log(error)}
-         )
+
+         putRequest(url, fdThumb, (data) => {setThumbnailStage('done')}, (error) => {console.log(error)})
      }
 
      const [thumbnailStage, setThumbnailStage] = useState('default')
diff --git a/src/Components/UploadPageComponents/PartTwoComponents/CustomCircularProgress.js b/src/Components/UploadPageComponents/PartTwoComponents/CustomCircularProgress.js
index 617a8e70b6a022139e4ecd843fa792117a38515c..2164091858560e3cb63f0c43099de40e2606b741 100644
--- a/src/Components/UploadPageComponents/PartTwoComponents/CustomCircularProgress.js
+++ b/src/Components/UploadPageComponents/PartTwoComponents/CustomCircularProgress.js
@@ -1,3 +1,21 @@
+/*Copyright (C) 2019 Centro de Computacao Cientifica e Software Livre
+Departamento de Informatica - Universidade Federal do Parana
+
+This file is part of Plataforma Integrada MEC.
+
+Plataforma Integrada MEC is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Plataforma Integrada MEC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with Plataforma Integrada MEC.  If not, see <http://www.gnu.org/licenses/>.*/
+
 import React from 'react';
 import { makeStyles } from '@material-ui/core/styles';
 import CircularProgress from '@material-ui/core/CircularProgress';
diff --git a/src/Components/UploadPageComponents/PartTwoComponents/DisplayThumbnail.js b/src/Components/UploadPageComponents/PartTwoComponents/DisplayThumbnail.js
index 261df04c61d83f1820446af0362c8bb51ad791b5..0c07e151670e4a256ed971abb978dad7b3107c5b 100644
--- a/src/Components/UploadPageComponents/PartTwoComponents/DisplayThumbnail.js
+++ b/src/Components/UploadPageComponents/PartTwoComponents/DisplayThumbnail.js
@@ -1,3 +1,21 @@
+/*Copyright (C) 2019 Centro de Computacao Cientifica e Software Livre
+Departamento de Informatica - Universidade Federal do Parana
+
+This file is part of Plataforma Integrada MEC.
+
+Plataforma Integrada MEC is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Plataforma Integrada MEC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with Plataforma Integrada MEC.  If not, see <http://www.gnu.org/licenses/>.*/
+
 import React from 'react'
 import {StyledFormLabel} from '../StyledComponents.js'
 import AddAPhotoIcon from '@material-ui/icons/AddAPhoto';
diff --git a/src/Components/UploadPageComponents/PartTwoComponents/EditThumbnail.js b/src/Components/UploadPageComponents/PartTwoComponents/EditThumbnail.js
index 35be2ce523737088ba7892dac513b255050d9925..7cce6bf2058f9c6512430053e27d6ed04f479800 100644
--- a/src/Components/UploadPageComponents/PartTwoComponents/EditThumbnail.js
+++ b/src/Components/UploadPageComponents/PartTwoComponents/EditThumbnail.js
@@ -1,3 +1,21 @@
+/*Copyright (C) 2019 Centro de Computacao Cientifica e Software Livre
+Departamento de Informatica - Universidade Federal do Parana
+
+This file is part of Plataforma Integrada MEC.
+
+Plataforma Integrada MEC is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Plataforma Integrada MEC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with Plataforma Integrada MEC.  If not, see <http://www.gnu.org/licenses/>.*/
+
 import React, {useState} from 'react'
 import {StyledFormLabel} from '../StyledComponents.js'
 import Cropper from '../../Cropper'
diff --git a/src/Components/UploadPageComponents/ReactFileToUpload.js b/src/Components/UploadPageComponents/ReactFileToUpload.js
index d7342d9c1c0b9484c719e1085f2bc43973a81f6c..ffbd6a452bddfe13eb14c996498ca17a897af2de 100644
--- a/src/Components/UploadPageComponents/ReactFileToUpload.js
+++ b/src/Components/UploadPageComponents/ReactFileToUpload.js
@@ -19,13 +19,13 @@ along with Plataforma Integrada MEC.  If not, see <http://www.gnu.org/licenses/>
 import React, {useState, useEffect} from 'react'
 import CloudUploadIcon from '@material-ui/icons/CloudUpload';
 import {DottedBox, BlueButton} from './StyledComponents.js';
-import {getAxiosConfig} from '../HelperFunctions/getAxiosConfig.js'
+import {getAxiosConfigFromJSON, updateHeaders} from '../HelperFunctions/getAxiosConfig.js'
 import AddAPhotoIcon from '@material-ui/icons/AddAPhoto';
 import axios from 'axios'
 import {apiUrl} from '../../env';
 
 export default function ReactFileToUpload (props) {
-    const [fileToUpload, setFileToUpload] = useState(null); 
+    const [fileToUpload, setFileToUpload] = useState(null);
     const chunkSize = 262144
     const uploadUrl = `${apiUrl}/learning_objects/` + props.draftID + '/chunk'
     const [fileName, setFileName] = useState(null)
@@ -50,7 +50,7 @@ export default function ReactFileToUpload (props) {
 
         for (var i = 0; i < total; i++) {
             let chunk = newFile.slice(currentChunkStartByte, currentChunkFinalByte)
-            let config = getAxiosConfig()
+            let config = getAxiosConfigFromJSON()
             let formData = new FormData()
             formData.append('_chunkFilename', newFile.name);
             formData.append('_chunkIdentifier', chunkIdentifier);
@@ -65,7 +65,7 @@ export default function ReactFileToUpload (props) {
                 const response = await axios.post(uploadUrl, formData, config);
                 console.log(response)
                 if (response.headers['access-token']) {
-                    sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
+                    updateHeaders(response.headers)
                 }
                 remainingBytes = newFile.size - currentChunkFinalByte;
                 if (currentChunkFinalByte === newFile.size) {
diff --git a/src/Components/UploadPageComponents/SendInfo.js b/src/Components/UploadPageComponents/SendInfo.js
index c931c5ba84cb7af7fa350c6a6aef8afcd5511ba4..ebcb1b95f377fe018e3a178716ff7d1621009dba 100644
--- a/src/Components/UploadPageComponents/SendInfo.js
+++ b/src/Components/UploadPageComponents/SendInfo.js
@@ -1,9 +1,25 @@
-import axios from 'axios'
-import {apiUrl} from '../../env';
+/*Copyright (C) 2019 Centro de Computacao Cientifica e Software Livre
+Departamento de Informatica - Universidade Federal do Parana
+
+This file is part of Plataforma Integrada MEC.
+
+Plataforma Integrada MEC is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Plataforma Integrada MEC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with Plataforma Integrada MEC.  If not, see <http://www.gnu.org/licenses/>.*/
+
+import {putRequest} from '../HelperFunctions/getAxiosConfig.js'
 
 
 export function SendInfo (fieldName, payload, draftID) {
-    console.log('fieldName', fieldName, 'payload', payload, 'draftID', draftID)
     const key = fieldName
     let value = payload
     if (key === "tags") {
@@ -18,23 +34,8 @@ export function SendInfo (fieldName, payload, draftID) {
         }
     }
     putObject.learning_object[key] = value
-    console.log(putObject)
 
-    let config = {
-        headers : {
-            'Accept': 'application/json',
-            'Content-Type': 'application/json',
-        }
-    }
-    config.headers["Access-Token"] = sessionStorage.getItem('@portalmec/accessToken');
-    config.headers.Client = sessionStorage.getItem('@portalmec/clientToken')
-    config.headers.Uid = sessionStorage.getItem('@portalmec/uid')
-    axios.put((`${apiUrl}/learning_objects/` + draftID), putObject, config)
-     .then( (response) => {
-        if ( response.headers['access-token'] ) {
-            sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-        }
-        console.log(response)
-    } , (error) => {console.log(error)})
+    const url = `/learning_objects/${draftID}`
 
+    putRequest(url, putObject, (data) => {console.log(data)}, (error) => {console.log(error)})
 }
diff --git a/src/Components/UploadPageComponents/Stepper.js b/src/Components/UploadPageComponents/Stepper.js
index 2c0a1179b5e2b28bd2510183fb7f67ab37ae907c..c1f9d40f55c2e4aafba0c44282ed441077853bf0 100644
--- a/src/Components/UploadPageComponents/Stepper.js
+++ b/src/Components/UploadPageComponents/Stepper.js
@@ -1,3 +1,21 @@
+/*Copyright (C) 2019 Centro de Computacao Cientifica e Software Livre
+Departamento de Informatica - Universidade Federal do Parana
+
+This file is part of Plataforma Integrada MEC.
+
+Plataforma Integrada MEC is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Plataforma Integrada MEC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with Plataforma Integrada MEC.  If not, see <http://www.gnu.org/licenses/>.*/
+
 import React from 'react';
 import styled from 'styled-components'
 import PropTypes from 'prop-types';
diff --git a/src/Components/UploadPageComponents/UploadFileWrapper.js b/src/Components/UploadPageComponents/UploadFileWrapper.js
index d93e8d47f1d254a40b927f3ade1098d832a90f7e..123512f2dc9e81026f99a2173cd573e1ed0f7e32 100644
--- a/src/Components/UploadPageComponents/UploadFileWrapper.js
+++ b/src/Components/UploadPageComponents/UploadFileWrapper.js
@@ -21,7 +21,7 @@ import LinkIcon from '../../img/link_icon.svg'
 import ChooseLink from './ChooseLinkSection.js'
 import {WrapperBox, BlueButton, GrayButton} from './StyledComponents.js';
 import {DottedBox} from './StyledComponents.js';
-import {getAxiosConfig} from '../HelperFunctions/getAxiosConfig.js'
+import {getAxiosConfigFromJSON, updateHeaders, deleteRequest, putRequest} from '../HelperFunctions/getAxiosConfig.js'
 import AddAPhotoIcon from '@material-ui/icons/AddAPhoto';
 import axios from 'axios'
 import {apiUrl} from '../../env';
@@ -71,7 +71,7 @@ export default function UploadFileWrapper (props) {
         handleNextStage("fileSelected")
         for (var i = 0; i < total; i++) {
             let chunk = newFile.slice(currentChunkStartByte, currentChunkFinalByte)
-            let config = getAxiosConfig()
+            let config = getAxiosConfigFromJSON()
             let formData = new FormData()
             formData.append('_chunkFilename', newFile.name);
             formData.append('_chunkIdentifier', chunkIdentifier);
@@ -86,7 +86,7 @@ export default function UploadFileWrapper (props) {
                 const response = await axios.post(uploadUrl, formData, config);
                 console.log(response)
                 if (response.headers['access-token']) {
-                    sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
+                    updateHeaders(response.headers)
                 }
                 setProgress(Math.round((currentChunkFinalByte/newFile.size) * 100))
                 remainingBytes = newFile.size - currentChunkFinalByte;
@@ -112,17 +112,9 @@ export default function UploadFileWrapper (props) {
 
     const handleDelete = () => {
         if (attachmentID != null) {
+            const url = `/learning_objects/${props.draftID}/attachment/${attachmentID}`
 
-        let config = getAxiosConfig()
-        axios.delete( (`${apiUrl}/learning_objects/` + props.draftID + '/attachment/' + attachmentID), config).then(
-            (response) => {
-                console.log(response)
-                if ( response.headers['access-token'] ) {
-                    sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-                }
-                handleNextStage("default")
-            },
-            (error) => {console.log(error)})
+            deleteRequest(url, (data) => {handleNextStage("default")}, (error) => {console.log(error)})
         }
     }
 
@@ -148,26 +140,18 @@ export default function UploadFileWrapper (props) {
     };
 
     const [snackbarOpen, toggleSnackbar] = useState(false)
+
     const handleChooseLink = (link) => {
-        let config = getAxiosConfig()
+        const url = `/learning_objects/${props.draftID}`
+
         let payload = {
             "learning_object" : {
                 "id" : props.draftID,
                 "link" : link
             }
         }
-        axios.put((`${apiUrl}/learning_objects/` + props.draftID), payload, config).then(
-            (response) => {
-                console.log(response)
-                if ( response.headers['access-token'] ) {
-                    sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-                }
-                toggleSnackbar(true)
-            }, (error) => {
-                console.log(error)
-            }
-        )
 
+        putRequest(url, payload, (data) => {toggleSnackbar(true)}, (error) => {console.log(error)})
     }
 
     switch (stage) {
diff --git a/src/Components/UserCard.js b/src/Components/UserCard.js
deleted file mode 100644
index c8cb4a80e14ae5f66c4f7f4a0466a424679d2da9..0000000000000000000000000000000000000000
--- a/src/Components/UserCard.js
+++ /dev/null
@@ -1,18 +0,0 @@
-/*Copyright (C) 2019 Centro de Computacao Cientifica e Software Livre
-Departamento de Informatica - Universidade Federal do Parana
-
-This file is part of Plataforma Integrada MEC.
-
-Plataforma Integrada MEC is free software: you can redistribute it and/or modify
-it under the terms of the GNU Affero General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-Plataforma Integrada MEC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU Affero General Public License for more details.
-
-You should have received a copy of the GNU Affero General Public License
-along with Plataforma Integrada MEC.  If not, see <http://www.gnu.org/licenses/>.*/
-
diff --git a/src/Components/UserPageComponents/Avatar.js b/src/Components/UserPageComponents/Avatar.js
index afecba1416e118f4418d68a4bdc388612dd26597..f5ff994f43bd2ed4c480d394b44e1be22132d4b4 100644
--- a/src/Components/UserPageComponents/Avatar.js
+++ b/src/Components/UserPageComponents/Avatar.js
@@ -26,7 +26,7 @@ export default function ProfileAvatar (props) {
     // eslint-disable-next-line
     const {state, dispatch} = useContext(Store)
 
-    const [currentAvatar, setAvatar] = useState(state.currentUser.avatar_file_name)
+    const [currentAvatar, setAvatar] = useState(state.currentUser.avatar)
 
     const [hoverBool, toggleHover] = React.useState(false)
     const handleToggleHover = () => {toggleHover(!hoverBool)}
@@ -34,7 +34,7 @@ export default function ProfileAvatar (props) {
     const [open, toggleOpen] = useState(false)
     const controlModal = () => {toggleOpen(!open)}
 
-    useEffect(() => {setAvatar(state.currentUser.avatar_file_name)}, state.currentUser.avatar_file_name)
+    useEffect(() => {setAvatar(state.currentUser.avatar)}, state.currentUser.avatar)
 
     return (
         <>
diff --git a/src/Components/UserPageComponents/Cover.js b/src/Components/UserPageComponents/Cover.js
index d2ba43e93248e0c74cd19b0f94f49f87a68d5e3e..339c36fd612cb3dc1a595c9a994a775af089c886 100644
--- a/src/Components/UserPageComponents/Cover.js
+++ b/src/Components/UserPageComponents/Cover.js
@@ -43,8 +43,8 @@ export default function Cover (props) {
     }
 
     useEffect( () => {
-        setCoverImg(state.currentUser.cover_file_name)
-    }, state.currentUser.cover_file_name)
+        setCoverImg(state.currentUser.cover)
+    }, state.currentUser.cover)
     return (
         <>
             <ModalAlterarCover
diff --git a/src/Pages/CollectionPage.js b/src/Pages/CollectionPage.js
index 35070a817b0e9fea3019581837d7b95df71e791e..7aec85f4c15248b0f38a886f918c5befc6df02d6 100644
--- a/src/Pages/CollectionPage.js
+++ b/src/Pages/CollectionPage.js
@@ -16,20 +16,20 @@ You should have received a copy of the GNU Affero General Public License
 along with Plataforma Integrada MEC.  If not, see <http://www.gnu.org/licenses/>.*/
 
 import React, { useRef, useState, useEffect, useContext } from 'react';
-import axios from 'axios';
 import { Grid } from '@material-ui/core';
 import CollectionAuthor from '../Components/CollectionAuthor.js';
 import VerticalRuler from '../Components/VerticalRuler.js';
 import CollectionDescription from '../Components/CollectionDescription.js';
 import ResourceList from '../Components/ResourceList.js';
 import CollectionCommentSection from '../Components/CollectionCommentSection.js';
-import { apiUrl, apiDomain } from '../env';
+import { apiDomain } from '../env';
 import styled from 'styled-components';
 import DowloadButton from '../Components/CollectionDowloadButton.js';
 import Breadcrumbs from "@material-ui/core/Breadcrumbs";
 import { Link } from 'react-router-dom';
 import FollowCollectionButton from '../Components/FollowCollectionButton';
 import { Store } from '../Store.js'
+import {getRequest} from '../Components/HelperFunctions/getAxiosConfig.js'
 
 export default function CollectionPage(props) {
 	const { state } = useContext(Store);
@@ -42,10 +42,9 @@ export default function CollectionPage(props) {
 	const comment_ref = useRef(null);
 
 	useEffect(() => {
-		axios.get(apiUrl + '/collections/' + collection_id)
-			.then(res => {
-				setCollection(Object.assign({}, res.data));
-			});
+        const url = `/collections/${collection_id}`
+
+        getRequest(url, (data) => {setCollection(Object.assign({}, data))}, (error) => {console.log(error)})
 	}, []);
 
 	const handleScrollToComments = () => {
@@ -143,11 +142,11 @@ export default function CollectionPage(props) {
 		// 	style={mainContainerStyle}>
 
 		// 	<Grid item xs={10} md={3}>
-		// 		<CollectionAuthor 
+		// 		<CollectionAuthor
 		// 			author_id={collection.owner ? collection.owner.id : 0}
 		// 			name={collection.owner ? collection.owner.name : ""}
 		// 			imgsrc={collection.owner ? apiDomain+collection.owner.avatar : ''}/>
-		// 	</Grid> 
+		// 	</Grid>
 
 		// 	<VerticalRuler width={1} height={300} color="rgb(238, 238, 238)"/>
 
@@ -156,12 +155,12 @@ export default function CollectionPage(props) {
 		// 			scrollToComments={handleScrollToComments}
 		// 			title={collection.name ? collection.name : ""}
 		// 			collection_id={collection.id ? collection.id : 0}/>
-		// 	</Grid> 
+		// 	</Grid>
 
 		// 	<Grid container item xs={12} direction="row" justify="center" alignItems="center" style={{backgroundColor: '#f4f4f4'}}>
 		// 		<Grid item xs={10}>
 		// 			<ResourceList resources={
-		// 					collection.collection_items ? 
+		// 					collection.collection_items ?
 		// 					collection.collection_items.map(i => {
 		// 						return {
 		// 							type: i.collectionable.object_type,
@@ -205,5 +204,3 @@ const BreadCrumbsDiv = styled.div`
   padding: 10px;
   display: flex;
 `;
-
-
diff --git a/src/Pages/EditLearningObjectPage.js b/src/Pages/EditLearningObjectPage.js
index 7f4e39ba6bd45cd6b6a48efb5d993c7a69251076..5e04a247c29d2b1fe130a18e5b15af4fab026d69 100644
--- a/src/Pages/EditLearningObjectPage.js
+++ b/src/Pages/EditLearningObjectPage.js
@@ -25,7 +25,6 @@ import UploadFileWrapper from '../Components/UploadPageComponents/UploadFileWrap
 import Alert from '../Components/Alert.js';
 import Snackbar from '@material-ui/core/Snackbar';
 import {GreyButton, OrangeButton, InfoBox} from '../Components/UploadPageComponents/StyledComponents.js'
-import {getAxiosConfig} from '../Components/HelperFunctions/getAxiosConfig.js'
 import {Background} from '../Components/UploadPageComponents/StyledComponents'
 import LoadingSpinner from '../Components/LoadingSpinner'
 import NewTitle from '../Components/UploadPageComponents/Forms/NewTitle.js'
@@ -41,7 +40,7 @@ import {LoadingDiv} from '../Components/UploadPageComponents/PartTwo.js'
 import EditThumbnail from '../Components/UploadPageComponents/PartTwoComponents/EditThumbnail.js'
 import DisplayThumbnail from '../Components/UploadPageComponents/PartTwoComponents/DisplayThumbnail.js'
 import DragAndDropThumbnail from '../Components/UploadPageComponents/PartTwoComponents/DragAndDropThumbnail'
-
+import {getRequest, deleteRequest, putRequest, postRequest} from '../Components/HelperFunctions/getAxiosConfig.js'
 
 export default function EditLearningObjectPage (props) {
     const recursoId = props.match.params.recursoId
@@ -52,23 +51,19 @@ export default function EditLearningObjectPage (props) {
     const [eduStages, setEduStages] = useState([])
     const [subjects, setSubjects] = useState([])
 
+    function handleSuccessfulGet (data) {
+        setLearningObject(data)
+        if(data.thumbnail) {
+            setThumbnail(data.thumbnail)
+            setThumbnailStage('done')
+        }
+        setUpdatedInfo({...updatedInfo, 'id' : data.id})
+        toggleLoading(false)
+    }
+
     useEffect( () => {
-        const config = getAxiosConfig()
-        axios.get( (`${apiUrl}/learning_objects/` + recursoId), config
-            ).then( (response) => {
-                console.log(response.data)
-                if ( response.headers['access-token'] ) {
-                    sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-                }
-                setLearningObject(response.data)
-                if(response.data.thumbnail) {
-                    setThumbnail(response.data.thumbnail)
-                    setThumbnailStage('done')
-                }
-                setUpdatedInfo({...updatedInfo, 'id' : response.data.id})
-                toggleLoading(false)
-            }, (error) => {console.log(error)}
-        )
+        const url = `/learning_objects/${recursoId}`
+        getRequest(url, handleSuccessfulGet, (error) => {console.log(error)})
 
         axios.get(`${apiUrl}/object_types/`).then(
             (response) => {
@@ -99,7 +94,7 @@ export default function EditLearningObjectPage (props) {
             },
             (error) => {console.log(error)}
         )
-    }, [state.currentUser.id])
+    }, [])
 
     const [loading, toggleLoading] = useState(true)
 
@@ -111,58 +106,37 @@ export default function EditLearningObjectPage (props) {
 
     const [snackbarOpen, toggleSnackbar] = useState(false)
 
+    function handleSuccessfulDelete (data) {
+        toggleSnackbar(true)
+        props.history.push("/")
+    }
     const handleDelete = () => {
-        let config = getAxiosConfig()
-        axios.delete((`${apiUrl}/learning_objects/` + learningObject.id), config).then(
-            (response) => {
-                toggleSnackbar(true)
-                console.log(response.data)
-                if ( response.headers['access-token'] ) {
-                    sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-                }
-                props.history.push("/")
-            },
-            (error) => {
-                console.log(error)
-            }
-        )
+        const url = `/learning_objects/${learningObject.id}`
+
+        deleteRequest(url, handleSuccessfulDelete, (error) => {console.log(error)})
     }
 
     const handleUpdateInfo = () => {
-        let config = getAxiosConfig()
-        console.log(updatedInfo)
+        const url = `/learning_objects/${learningObject.id}`
         let payload = {
             "learning_object" : updatedInfo
         }
-        console.log(payload)
-        axios.put((`${apiUrl}/learning_objects/` + learningObject.id), payload, config).then(
-            (response) => {
-                if ( response.headers['access-token'] ) {
-                    sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-                }
-                console.log(response.data); props.history.goBack()
-            },
-            (error) => {console.log(error)}
-        )
+
+        putRequest(url, payload, (data) => {props.history.goBack()}, (error) => {console.log(error)})
     }
 
     const handlePost = () => {
-        let config = getAxiosConfig()
-        console.log(updatedInfo)
+        const url = `/learning_objects/${learningObject.id}/publish`
+
         let payload = {
             "learning_object" : updatedInfo
         }
-        console.log(payload)
-        axios.post((`${apiUrl}/learning_objects/` + learningObject.id + '/publish'), payload, config).then(
-            (response) => {
-                if ( response.headers['access-token'] ) {
-                    sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-                }
-                console.log(response.data);
-                props.history.push('/recurso/' + learningObject.id)
-            },
+
+        postRequest(url, payload,
+            (data) => {props.history.push( `/recurso/${learningObject.id}`)},
             (error) => {console.log(error)}
         )
+
     }
 
     const [thumbnailStage, setThumbnailStage] = useState('default')
@@ -182,63 +156,31 @@ export default function EditLearningObjectPage (props) {
 
     }
 
+    function handleFinalizeThumb (data) {
+        if(data.thumbnail) {
+            setThumbnail(data.thumbnail)
+            setThumbnailStage('done')
+        }
+    }
+
     const finalizeThumb = () => {
         setThumbnailStage('uploading')
-        let config = {
-            headers : {
-                'Accept': 'application/json',
-                'Content-Type': 'application/json',
-            }
-        }
-        config.headers["access-Token"] = sessionStorage.getItem('@portalmec/accessToken');
-        config.headers.client = sessionStorage.getItem('@portalmec/clientToken')
-        config.headers.uid = sessionStorage.getItem('@portalmec/uid')
+
+        const url = `/learning_objects/${learningObject.id}`
 
         let fdThumb = new FormData()
         fdThumb.set('learning_object[thumbnail]', thumbnail)
-        axios.put((`${apiUrl}/learning_objects/` + learningObject.id), fdThumb, config).then(
-            (response) => {
-                setThumbnailStage('done')
-                console.log(response.data)
-                if ( response.headers['access-token'] ) {
-                    sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-                }
-                if(response.data.thumbnail) {
-                    setThumbnail(response.data.thumbnail)
-                    setThumbnailStage('done')
-                }
-            },
-            () => {
-                setThumbnailStage('default')
-            }
-        )
+
+        putRequest(url, fdThumb, handleFinalizeThumb, (error) => {setThumbnailStage('default')})
     }
 
     const handleDeleteThumbnail = () => {
-        let config = {
-            headers : {
-                'Accept': 'application/json',
-                'Content-Type': 'application/json',
-            }
-        }
-        config.headers["access-Token"] = sessionStorage.getItem('@portalmec/accessToken');
-        config.headers.client = sessionStorage.getItem('@portalmec/clientToken')
-        config.headers.uid = sessionStorage.getItem('@portalmec/uid')
+        const url = `/learning_objects/${learningObject.id}`
 
         let fdThumb = new FormData()
         fdThumb.set('learning_object[thumbnail]', null)
-        axios.put((`${apiUrl}/learning_objects/` + learningObject.id), fdThumb, config).then(
-            (response) => {
-                setThumbnailStage('default')
-                console.log(response.data)
-                if ( response.headers['access-token'] ) {
-                    sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-                }
-            },
-            (error) => {
-                console.log(error)
-            }
-        )
+
+        putRequest(url, fdThumb, (data) => {setThumbnailStage('default')}, (error) => {console.log(error)})
     }
 
     const chooseRenderStageThumbnail = () => {
diff --git a/src/Pages/EditProfilePage.js b/src/Pages/EditProfilePage.js
index b91d0c4d6186cf0d394d1e887e3f9f630d8a6195..381a2872bd9441e8442b2944dbe1d9daabe70d07 100644
--- a/src/Pages/EditProfilePage.js
+++ b/src/Pages/EditProfilePage.js
@@ -10,13 +10,11 @@ import Snackbar from '@material-ui/core/Snackbar';
 import {Alert} from '../Components/LoginModal.js'
 import Grid from '@material-ui/core/Grid'
 import CustomizedBreadcrumbs from '../Components/TabPanels/Breadcrumbs.js'
-import axios from 'axios'
-import {getAxiosConfig} from '../Components/HelperFunctions/getAxiosConfig'
-import {apiUrl} from '../env.js'
+import {putRequest} from '../Components/HelperFunctions/getAxiosConfig'
 import {Store} from '../Store.js'
 
 export default function EditProfilePage (props) {
-    const {state} = useContext(Store)
+    const {state, dispatch} = useContext(Store)
     const id = state.currentUser.id
 
     // eslint-disable-next-line
@@ -38,62 +36,42 @@ export default function EditProfilePage (props) {
     }
 
     const updateUserInfo = (newUserInfo) => {
-        console.log(newUserInfo)
-        let config = getAxiosConfig()
-
-        axios.put( (`${apiUrl}/users/` + id), newUserInfo, config
-        ).then (
-            (res) => {
-                console.log(res)
-                if ( res.headers['access-token'] ) {
-                    sessionStorage.setItem('@portalmec/accessToken', res.headers['access-token'])
-                }
-
-                props.history.push('/perfil')
-
-            },
-            (err) => {
-                console.log(err)
-            }
+        const url = `/users/${id}`
+
+        putRequest(url, newUserInfo,
+            (data) => {props.history.push('/perfil')},
+            (error) => {console.log(error)}
         )
     }
 
+    function handleSuccessUpdateEmail (data) {
+        let auth_headers = JSON.parse(sessionStorage.getItem('@portalmec/auth_headers'))
+
+        auth_headers['uid'] = data.uid
+
+        sessionStorage.setItem('@portalmec/auth_headers', JSON.stringify(auth_headers))
+
+        const target = state.currentUser
+        const source = {uid : data.uid}
+        dispatch({
+            type : 'USER_UPDATED_EMAIL',
+            currUser : Object.assign(target, source)
+        })
+    }
+
     const updateUserEmail = (newUserInfo) => {
-        let config = getAxiosConfig()
-
-        axios.put( (`${apiUrl}/users/` + id), newUserInfo, config
-        ).then (
-            (res) => {
-                console.log(res)
-                if ( res.headers['access-token'] ) {
-                    sessionStorage.setItem('@portalmec/accessToken', res.headers['access-token'])
-                }
-
-                sessionStorage.setItem('@portalmec/uid', res.headers['uid'])
-            },
-            (err) => {
-                console.log(err)
-            }
+        const url = `/users/${id}`
+
+        putRequest(url, newUserInfo, handleSuccessUpdateEmail, (error) => {console.log(error)}
         )
     }
 
     const updateUserPassword = (newUserInfo) => {
-        let config = getAxiosConfig()
-
-        axios.put( (`${apiUrl}/users/` + id), newUserInfo, config
-        ).then (
-            (res) => {
-                console.log(res)
-                if ( res.headers['access-token'] ) {
-                    sessionStorage.setItem('@portalmec/accessToken', res.headers['access-token'])
-                }
-
-                handleSnackbar(true)
-                
-            },
-            (err) => {
-                console.log(err)
-            }
+        const url = `/users/${id}`
+
+        putRequest(url, newUserInfo,
+            (data) => {handleSnackbar(true)},
+            (error) => {console.log(error)}
         )
     }
 
diff --git a/src/Pages/PageProfessor.js b/src/Pages/PageProfessor.js
index 6c2f45380a19d8ced2e175add35b0387931b0f32..6ee8588e27a0ba57100336e6da714c2c938f1acd 100644
--- a/src/Pages/PageProfessor.js
+++ b/src/Pages/PageProfessor.js
@@ -6,8 +6,7 @@ import PartTwo from '../Components/PageProfessorComponents/PartTwo.js'
 import PartThree from '../Components/PageProfessorComponents/PartThree.js'
 import SuccessfulRequest from '../Components/PageProfessorComponents/SuccessfulRequest.js'
 import ModalConfirmarProfessor from '../Components/PageProfessorComponents/ModalConfirmarProfessor.js'
-import axios from 'axios'
-import {apiUrl} from '../env';
+import {postRequest} from '../Components/HelperFunctions/getAxiosConfig'
 
 export default function PageProfessor (props) {
     const {state} = useContext(Store)
@@ -49,7 +48,6 @@ export default function PageProfessor (props) {
     }
 
     const handleBuscarParteUm = (ufAbbreviation, ufName, nomeMunicipio, inep) => {
-        console.log('handleBuscarParteUm: ', ufAbbreviation, ufName, nomeMunicipio, inep)
         setRegisterInformation({...registerInformation,
             school_uf : {
                 abbreviation: (ufAbbreviation ? ufAbbreviation : ''),
@@ -90,27 +88,24 @@ export default function PageProfessor (props) {
         props.history.push('/perfil/atualizacoes')
     }
 
+    function handleSuccessfulSubmit (data) {
+        toggleModal()
+        toggleStepper(false, false, false, true)
+    }
+
     const handleFinalSubmit = () => {
-        //adicionar headers de accessToken
-        axios.post( `${apiUrl}/users/teacher_request`, {
+        const url = `/users/teacher_request`
+
+        const payload = {
             city : registerInformation.school_city.name,
             cpf : registerInformation.teacher_cpf,
             inep_id : registerInformation.inep_code,
             phone : registerInformation.school_phone,
             school : registerInformation.school_name,
             uf : registerInformation.school_uf.name
-        },
-        { headers : {
-            'Access-Token': sessionStorage.getItem('@portalmec/accessToken'),
-            'Client': sessionStorage.getItem('@portalmec/clientToken'),
-            'Uid': sessionStorage.getItem('@portalmec/uid')
-        }}
-        )
-        .then( (response) => {
-            toggleModal()
-            toggleStepper(false, false, false, true)
-        }, (error) => console.log('deu erro')
-    )
+        }
+
+        postRequest(url, payload, handleSuccessfulSubmit, (error) =>{console.log(error)})
     }
 
     return (
@@ -118,7 +113,6 @@ export default function PageProfessor (props) {
         {
             state.userAgreedToPublicationTerms?
             (
-                [
                     <>
                         <ModalConfirmarProfessor open={modalOpen} handleClose={handleModal}
                          info={registerInformation} confirmar = {() => {handleFinalSubmit()}}
@@ -154,7 +148,6 @@ export default function PageProfessor (props) {
                             </div>
                         </div>
                     </>
-                ]
             )
             :
             (
diff --git a/src/Pages/PasswordRecoveryPage.js b/src/Pages/PasswordRecoveryPage.js
index a2691a50b901e88c2ab24aa323d07894ddf85bc3..010a164ba112a342e7e01e14fc2c5ba2bc38a1ff 100644
--- a/src/Pages/PasswordRecoveryPage.js
+++ b/src/Pages/PasswordRecoveryPage.js
@@ -2,14 +2,12 @@ import React, {useState} from 'react'
 import {BackgroundDiv} from '../Components/TabPanels/StyledComponents.js'
 import Paper from '@material-ui/core/Paper';
 import styled from 'styled-components'
-import ValidateUserInput from '../Components/FormValidationFunction.js'
+import ValidateUserInput from '../Components/HelperFunctions/FormValidationFunction.js'
 import Default from '../Components/PasswordRecoveryComponents/Default.js'
 import Success from '../Components/PasswordRecoveryComponents/Success.js'
 import CaseError from '../Components/PasswordRecoveryComponents/Error.js'
 import CustomizedBreadcrumbs from '../Components/TabPanels/Breadcrumbs.js'
-import {apiUrl} from '../env';
-import axios from 'axios'
-
+import {postRequest} from '../Components/HelperFunctions/getAxiosConfig'
 
 export default function PasswordRecoveryPage (props) {
 
@@ -40,18 +38,21 @@ export default function PasswordRecoveryPage (props) {
         setCase(value)
     };
 
+    function handleSuccessfulSubmit (data) {
+        handleChangeSwitch((data.success ? "success" : "error"))
+    }
     const onSubmit = (e) => {
         e.stopPropagation()
+
+        const url = `/auth/password`
+
         const payload = {
             "email" : formEmail.value,
             "redirect_url" : "https://plataformaintegrada.mec.gov.br/recuperar-senha#/alterar-senha"
         }
-        axios.post((`${apiUrl}/auth/password`), payload).then(
-            (response) => {
-                console.log(response)
-                handleChangeSwitch(response.data.success ? "success" : "error")
-            },
-            (error) => {console.log(error)})
+
+        postRequest(url, payload, handleSuccessfulSubmit, (error) => {console.log(error)})
+
     }
 
 
diff --git a/src/Pages/ProfilePage.js b/src/Pages/ProfilePage.js
deleted file mode 100644
index 6959ad9357650785a7088ddbb25ac0a0ac3bffe1..0000000000000000000000000000000000000000
--- a/src/Pages/ProfilePage.js
+++ /dev/null
@@ -1,30 +0,0 @@
-/*Copyright (C) 2019 Centro de Computacao Cientifica e Software Livre
-Departamento de Informatica - Universidade Federal do Parana
-
-This file is part of Plataforma Integrada MEC.
-
-Plataforma Integrada MEC is free software: you can redistribute it and/or modify
-it under the terms of the GNU Affero General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-Plataforma Integrada MEC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU Affero General Public License for more details.
-
-You should have received a copy of the GNU Affero General Public License
-along with Plataforma Integrada MEC.  If not, see <http://www.gnu.org/licenses/>.*/
-
-import React, {Component} from 'react';
-
-
-class ProfilePage extends Component {
-    render() {
-      return (
-        <h1> Página visulizar prefil de usuário</h1>
-      );
-    }
-  }
-
-export default ProfilePage;
diff --git a/src/Pages/PublicUserPage.js b/src/Pages/PublicUserPage.js
index 6ff59cb44ae98e984a0401c41bafde8d921a3900..2000c8619371ba81c0b8ea395ede083935a4a1de 100644
--- a/src/Pages/PublicUserPage.js
+++ b/src/Pages/PublicUserPage.js
@@ -18,8 +18,7 @@ along with Plataforma Integrada MEC.  If not, see <http://www.gnu.org/licenses/>
 
 import React, {useEffect, useState} from 'react'
 import styled from 'styled-components'
-import axios from 'axios'
-import {apiUrl, apiDomain} from '../env';
+import {apiDomain} from '../env';
 import CustomizedBreadcrumbs from '../Components/TabPanels/Breadcrumbs.js'
 import Grid from '@material-ui/core/Grid';
 import FollowButton from '../Components/ContactButtons/FollowButton.js'
@@ -34,6 +33,7 @@ import TabRede from '../Components/TabPanels/PublicUserPageTabs/TabRede.js'
 import CheckDecagram from '../img/check-decagram-blue.svg'
 import ReportButton from '../Components/ReportButton.js'
 import {HeaderContainer, UserProfileContainer, CoverContainer, UserProfileInfoDiv, StyledTabs, CheckTeacherDiv, RodapeDiv, NavBarContentContainer, BackgroundDiv} from '../Components/TabPanels/StyledComponents.js'
+import {fetchAllRequest} from '../Components/HelperFunctions/getAxiosConfig'
 
 const RenderFollowContainer = (boolUserFollowed, id, followCount) => {
     return (
@@ -121,38 +121,19 @@ export default function PublicUserPage (props) {
     const handleCollections = (data) => {setCollections(data)}
     /*---------------------------------------------------------*/
 
+    function handleSuccess (responseArr) {
+        fillUserInfo(responseArr[0])
+
+        handleLearningObjects(responseArr[1])
+
+        handleCollections(responseArr[2])
+    }
 
     /*Component Will Mount*/
     useEffect( () => {
-        let config = {
-            headers : {
-                'Accept': 'application/json',
-                'Content-Type': 'application/json',
-                'Access-Token': sessionStorage.getItem('@portalmec/accessToken'),
-                'Client': sessionStorage.getItem('@portalmec/clientToken'),
-                'Uid': sessionStorage.getItem('@portalmec/uid'),
-            }
-        }
-        axios.all([
-            axios.get( (`${apiUrl}/users/` + id ), config ),
-            axios.get( (`${apiUrl}/users/` + id + '/learning_objects'), {'Accept': 'application/json','Content-Type':'application/json'}),
-            axios.get( (`${apiUrl}/users/` + id + '/collections'), {'Accept': 'application/json','Content-Type':'application/json'})
-        ])
-        .then( (responseArr) => {
-
-            console.log(responseArr)
-            fillUserInfo(responseArr[0].data)
-
-            console.log(responseArr[1])
-            handleLearningObjects(responseArr[1].data)
-
-            console.log(responseArr[2])
-            handleCollections(responseArr[2].data)
-            },
-            (error) => {
-                console.log('error while running ComponentDidMout')
-            }
-        )
+        const urls = [`/users/${id}`, `/users/${id}/learning_objects`, `/users/${id}/collections`]
+
+        fetchAllRequest(urls, handleSuccess, (error) => {console.log(error)})
     }, [])
     /*---------------------------------------------------------*/
 
@@ -170,7 +151,7 @@ export default function PublicUserPage (props) {
                                 <HeaderContainer>
                                     <>
                                     {RenderFollowContainer(userData.followed, id, userData.follows_count)}
-                                    {RenderProfileAvatar(userData.avatar ? userData.avatar : noAvatar)}
+                                    {RenderProfileAvatar(userData.avatar ? userData.avatar : undefined)}
                                     <CoverContainer>
                                         {userData.cover && <img src={apiDomain + userData.cover} alt = '' style= {{width:"100%", height:"100%", objectFit : "cover" }}/>}
                                     </CoverContainer>
@@ -208,7 +189,7 @@ export default function PublicUserPage (props) {
                         {tabValue === 0 &&
                             <TabInicio id={id} user={userData} learningObjs={learningObjArr} collections={collectionsArr}/>}
                         {tabValue === 1 &&
-                            <TabRecursos count={userData.learning_objects_count} learningObjs={learningObjArr}/>}
+                            <TabRecursos count={userData.learning_objects_count} learningObjs={learningObjArr} id={id}/>}
                         {tabValue === 2 &&
                             <TabColecoes count={userData.collections_count} collections={collectionsArr}
                                 />}
diff --git a/src/Pages/ResourcePage.js b/src/Pages/ResourcePage.js
index 546cffcdb415f4ce53b0becdad0dc9e1eff83c1a..194807e62cc60998b5b1f470a2bf7decc803fef4 100644
--- a/src/Pages/ResourcePage.js
+++ b/src/Pages/ResourcePage.js
@@ -19,8 +19,7 @@ along with Plataforma Integrada MEC.  If not, see <http://www.gnu.org/licenses/>
 import React, {useEffect, useState, useContext} from 'react'
 import {Store} from '../Store.js'
 import styled from 'styled-components'
-import axios from 'axios'
-import {apiUrl, apiDomain} from '../env';
+import {apiDomain} from '../env';
 import Grid from '@material-ui/core/Grid';
 import TextoObjeto from '../Components/ResourcePageComponents/TextoObjeto.js'
 import Footer from '../Components/ResourcePageComponents/Footer.js'
@@ -36,7 +35,7 @@ import AppBar from '@material-ui/core/AppBar';
 import ButtonAvaliarRecurso from '../Components/ButtonAvaliarRecurso'
 import ModalAvaliarRecurso from '../Components/ModalAvaliarRecurso'
 import ModalConfirmarCuradoria from '../Components/ModalConfirmarCuradoria'
-import {getAxiosConfig} from '../Components/HelperFunctions/getAxiosConfig'
+import {getRequest} from '../Components/HelperFunctions/getAxiosConfig'
 
 function urlVerify (url) {
     return (url ? url.indexOf("youtu") !== -1 || url.indexOf("vimeo") !== -1 : false)
@@ -48,29 +47,16 @@ export default function LearningObjectPage (props){
     const [carregando, toggle] = useState(true)
     const [recurso, setRecurso] = useState({})
 
+    function handleSuccessfulGet (data) {
+        setRecurso(data)
+        toggle(false)
+    }
     useEffect( () => {
-        let config = {
-            headers : {
-                'Accept': 'application/json',
-                'Content-Type': 'application/json',
-            }
-        }
-        if (state.currentUser.id !== "") {
-            config.headers["Access-Token"] = sessionStorage.getItem('@portalmec/accessToken');
-            config.headers.Client = sessionStorage.getItem('@portalmec/clientToken')
-            config.headers.Uid = sessionStorage.getItem('@portalmec/uid')
-        }
+        const url = `/learning_objects/${id}`
 
-        axios.get( (`${apiUrl}/learning_objects/` + id), config
-        ).then( (response) => {
-            if ( response.headers['access-token'] ) {
-                sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-            }
-            console.log(response)
-            setRecurso(response.data)
-            toggle(false)
-        }, (error) => {console.log(error);})
-    }, [state.currentUser])
+        getRequest(url, handleSuccessfulGet, (error) => {console.log(error)})
+
+    }, [])
 
 
     const [snackbarOpen, toggleSnackbar] = useState(false)
@@ -118,15 +104,8 @@ export default function LearningObjectPage (props){
 
     const finalizeCuratorshipFlow = () => {
         handleModalConfirmarCuradoria(false)
-        let config = getAxiosConfig()
-        axios.get( (`${apiUrl}/learning_objects/` + id), config
-        ).then( (response) => {
-            if ( response.headers['access-token'] ) {
-                sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-            }
-            console.log(response)
-            setRecurso(response.data)
-        }, (error) => {console.log(error);})
+        const url = `/learning_objects/${id}`
+        getRequest(url, (data) => {setRecurso(data)}, (error) => {console.log(error)})
     }
 
     return (
diff --git a/src/Pages/Search.js b/src/Pages/Search.js
index 26bf2ed3c08d592ffc301b848bda6d8b24d13a3e..6d88bed07d954a318dc0a56152f8073a8bdb0855 100644
--- a/src/Pages/Search.js
+++ b/src/Pages/Search.js
@@ -39,7 +39,6 @@ import ResourceCardFunction from "../Components/ResourceCardFunction";
 import CollectionCardFunction from "../Components/CollectionCardFunction";
 import ContactCard from "../Components/ContactCard";
 import CircularProgress from '@material-ui/core/CircularProgress';
-import { getAxiosConfig } from '../Components/HelperFunctions/getAxiosConfig';
 import { saveHeaders } from '../Components/HelperFunctions/saveTokens';
 
 
@@ -84,6 +83,7 @@ export default function Search(props) {
     if (filtro)
       setIsFiltering(true);
 
+    /// TODO: FIX this axios call
     const axiosConfig = getAxiosConfig();
     axios({
       method: 'get',
diff --git a/src/Pages/UploadPage.js b/src/Pages/UploadPage.js
index 8883bceff94c2b8907525e7169ae2b4c9f4d5d37..848b3b5b76edf5f975011b676dcfc021bbcd701e 100644
--- a/src/Pages/UploadPage.js
+++ b/src/Pages/UploadPage.js
@@ -17,14 +17,12 @@ You should have received a copy of the GNU Affero General Public License
 along with Plataforma Integrada MEC.  If not, see <http://www.gnu.org/licenses/>.*/
 
 import React, {useState, useEffect, useContext} from 'react'
-import axios from 'axios'
-import {apiUrl} from '../env';
 import Grid from '@material-ui/core/Grid';
 import UploadFileWrapper from '../Components/UploadPageComponents/UploadFileWrapper.js'
 import {Store} from '../Store.js'
 import {InfoBox} from '../Components/UploadPageComponents/StyledComponents.js'
 import Stepper from '../Components/UploadPageComponents/Stepper.js'
-import {getAxiosConfig} from '../Components/HelperFunctions/getAxiosConfig.js'
+import {postRequest} from '../Components/HelperFunctions/getAxiosConfig.js'
 import PartOne from '../Components/UploadPageComponents/PartOne.js'
 import PartTwo from '../Components/UploadPageComponents/PartTwo.js'
 import PartThree from '../Components/UploadPageComponents/PartThree.js'
@@ -42,19 +40,19 @@ export default function UploadPage (props) {
 
     const [loading, toggleLoading] = useState(true)
     const [draft, setDraft] = useState({})
+    function handleSuccessfulGet (data) {
+        setDraft(data)
+        toggleLoading(false)
+    }
     useEffect( () => {
         if (state.currentUser.id !== "") {
-            const config = getAxiosConfig()
+
+            const url = `/learning_objects/`
+
             let payload = {}
-            axios.post( (`${apiUrl}/learning_objects/`), payload, config
-            ).then( (response) => {
-                if ( response.headers['access-token'] ) {
-                    sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-                }
-                setDraft(response.data)
-                toggleLoading(false)
-                console.log(response)
-            }, (error) => {console.log(error)})
+
+            postRequest(url, payload, handleSuccessfulGet, (error) => {console.log(error)})
+
         }
     }, [])
 
@@ -66,38 +64,33 @@ export default function UploadPage (props) {
 
     const handlePost = () => {
         if (state.currentUser.id !== "") {
-            const config = getAxiosConfig()
+            const url = `/learning_objects/${draft.id}/publish`
+
             let payload = {}
-            axios.post( (`${apiUrl}/learning_objects/` + draft.id + '/publish'), payload, config
-            ).then( (response) => {
-                if ( response.headers['access-token'] ) {
-                    sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-                }
-                handleModal(true)
-                console.log(response)
 
-            }, (error) => {console.log(error)})
+            postRequest(url, payload,
+                (data) => {handleModal(true)},
+                (error) => {console.log(error)}
+            )
+
         }
     }
 
     const handleSubmit = () => {
         if (state.currentUser.id !== "") {
-            const config = getAxiosConfig()
+            const url = `/submissions/`
+
             let payload = {
                 "submission" : {
                     "learning_object_id" : draft.id
                 }
             }
 
-            axios.post( (`${apiUrl}/submissions/`), payload, config
-            ).then( (response) => {
-                if ( response.headers['access-token'] ) {
-                    sessionStorage.setItem('@portalmec/accessToken', response.headers['access-token'])
-                }
-                handleModal(true)
-                console.log(response)
+            postRequest(url, payload,
+                (data) => {handleModal(true)},
+                (error) => {console.log(error)}
+            )
 
-            }, (error) => {console.log(error)})
         }
     }
 
diff --git a/src/Pages/UserPage.js b/src/Pages/UserPage.js
index 92d821b53164aecb062223c61fb372ebcc3351e4..c4b0755096ba9eae554a9525245915dccc2536d8 100644
--- a/src/Pages/UserPage.js
+++ b/src/Pages/UserPage.js
@@ -28,8 +28,6 @@ import TabPanelFavoritos from '../Components/TabPanels/UserPageTabs/PanelFavorit
 import TabPanelColecoes from '../Components/TabPanels/UserPageTabs/PanelColecoes.js'
 import TabPanelRede from '../Components/TabPanels/UserPageTabs/PanelRede.js'
 import TabPanelCuradoria from '../Components/TabPanels/UserPageTabs/PanelCuradoria.js'
-import axios from 'axios'
-import {apiUrl} from '../env';
 import Grid from '@material-ui/core/Grid';
 import {HeaderContainer, UserProfileContainer, CheckTeacherDiv, StyledTabs, RodapeDiv, NavBarContentContainer, BackgroundDiv} from '../Components/TabPanels/StyledComponents.js'
 
@@ -38,23 +36,7 @@ import ProfileAvatar from '../Components/UserPageComponents/Avatar.js'
 import UserInfo from '../Components/UserPageComponents/UserInfo.js'
 import EditProfileButton from '../Components/UserPageComponents/EditProfileButton.js'
 import SubmitterStatus from '../Components/UserPageComponents/SubmitterStatus.js'
-import {getAxiosConfig} from '../Components/HelperFunctions/getAxiosConfig.js'
-
-const GetHeaderConfig = () => {
-
-    let config = {
-        headers : {
-            'Accept': 'application/json',
-            'Content-Type': 'application/json',
-            'Access-Token': sessionStorage.getItem('@portalmec/accessToken'),
-            'Client': sessionStorage.getItem('@portalmec/clientToken'),
-            'Uid': sessionStorage.getItem('@portalmec/uid'),
-        }
-    }
-    // {/*'Host': 'api.portalmec.c3sl.ufpr.br',
-    // 'Cookie': ''*/}
-    return config
-}
+import {getRequest} from '../Components/HelperFunctions/getAxiosConfig.js'
 
 export default function UserPage (props){
     const {state, dispatch} = useContext(Store)
@@ -70,31 +52,25 @@ export default function UserPage (props){
         setTabValue(newValue)
     }
 
+    function handleSuccessfulGet (data) {
+        dispatch ( {
+            type: 'GET_USER',
+            user: data
+            }
+        )
+
+        if((data.role_ids.includes(4))) {
+            setTabs([
+                'Atividades', 'Meus Recursos', 'Favoritos', 'Coleções', 'Rede', 'Curadoria'
+            ])
+        }
+    }
+
     useEffect( () => {
-        let config = getAxiosConfig()
         if (id !== '') {
-            axios.get( (`${apiUrl}/users/` + id), config)
-            .then( (response) => {
-                console.log(response)
-                dispatch ( {
-                    type: 'GET_USER',
-                    user: response.data
-                    }
-                )
-
-                if((response.data.role_ids.includes(4))) {
-                    setTabs([
-                        'Atividades', 'Meus Recursos', 'Favoritos', 'Coleções', 'Rede', 'Curadoria'
-                    ])
-                }
-            }).catch( (error) => {
-                if (error.statusText === 401) {
-                    console.log('erro 401')
-                    //validate Token
-
-                    //retry request
-                }
-            })
+            const url = `/users/${id}`
+
+            getRequest(url, handleSuccessfulGet, (error) => {console.log(error)})
         }
     }, [])
 
@@ -115,7 +91,7 @@ export default function UserPage (props){
                         <ModalAlterarAvatar
                             open={modalOpen}
                             handleClose={() => {toggleModal(false)}}
-                            userAvatar={state.currentUser.avatar_file_name}
+                            userAvatar={state.currentUser.avatar}
                         />
 
                     <BackgroundDiv>
@@ -164,17 +140,17 @@ export default function UserPage (props){
 
                                 <Grid item xs={12}>
                                     {tabValue === 0 &&
-                                        <TabPanelAtividades id={id} config={GetHeaderConfig()}/>}
+                                        <TabPanelAtividades id={id}/>}
                                     {tabValue === 1 &&
-                                        <TabPanelMeusRecursos id={id} config={GetHeaderConfig()}/>}
+                                        <TabPanelMeusRecursos id={id}/>}
                                     {tabValue === 2 &&
-                                        <TabPanelFavoritos id={id} config={GetHeaderConfig()}/>}
+                                        <TabPanelFavoritos id={id}/>}
                                     {tabValue === 3 &&
-                                        <TabPanelColecoes id={id} config={GetHeaderConfig()}/>}
+                                        <TabPanelColecoes id={id}/>}
                                     {tabValue === 4 &&
-                                        <TabPanelRede id={id} config={GetHeaderConfig()}/>}
+                                        <TabPanelRede id={id}/>}
                                     {tabValue === 5 &&
-                                        <TabPanelCuradoria id={id} config={GetHeaderConfig()}/>}
+                                        <TabPanelCuradoria id={id}/>}
                                 </Grid>
                             </Grid>
                         </BackgroundDiv>
diff --git a/src/Store.js b/src/Store.js
index d53af64db8a76e34c23dd854893b0a03dd23dec6..6beb65ee59e17e1bcb427dfccf31fbb433f40922 100644
--- a/src/Store.js
+++ b/src/Store.js
@@ -39,8 +39,8 @@ const initialState = {
       id : '',
       name : '',
       email : '',
-      avatar_file_name : '',
-      cover_file_name : '',
+      avatar : '',
+      cover : '',
       uid : '',
       follows_count : 0,
       collections_count : 0,
@@ -83,7 +83,19 @@ function reducer(state, action) {
         return {
             ...state,
             userIsLoggedIn:action.userLoggedOut,
-            currentUser:action.login,
+            currentUser:{
+                askTeacherQuestion : false,
+                id : '',
+                name : '',
+                email : '',
+                avatar_file_name : '',
+                cover_file_name : '',
+                uid : '',
+                follows_count : 0,
+                collections_count : 0,
+                submitter_request : 'default',
+                roles : []
+            },
             userAgreedToPublicationTerms: false,
             userAgreedToPublicationPermissions: false
         }
@@ -136,6 +148,11 @@ function reducer(state, action) {
             ...state,
             currentUser:action.user
       }
+    case 'USER_UPDATED_EMAIL':
+        return {
+            ...state,
+            currentUser : action.currUser
+        }
     default:
       return state
   }