Authentication mechanism done, replaced json implementation