Deposition of polyaniline layers with controlled thickness and morphology by in situ polymerization