login, logut etc now working in both frontend and backend along with a mongodb database