[UPDATE] (api) Added login logic on the backend